pep8
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
# coding=UTF-8
|
# coding=UTF-8
|
||||||
|
|
||||||
|
|
||||||
class ValidationError(Exception):
|
class ValidationError(Exception):
|
||||||
|
|
||||||
def __init__(self, message):
|
def __init__(self, message):
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from .designer import Designer
|
from .designer import Designer
|
||||||
from .category import Category
|
from .category import Category
|
||||||
from .contract_customer import ContractCustomer
|
from .contract_customer import ContractCustomer
|
||||||
from .inquiry import Inquiry
|
from .inquiry import Inquiry
|
||||||
|
|||||||
@@ -27,11 +27,12 @@ class Material(db.Model):
|
|||||||
|
|
||||||
query_class = MaterialQuery
|
query_class = MaterialQuery
|
||||||
|
|
||||||
WALLPAPER_MATERIALS = ['standard-wallpaper', 'self-adhesive-wallpaper', 'premium-wallpaper']
|
WALLPAPER_MATERIALS = ['standard-wallpaper',
|
||||||
|
'self-adhesive-wallpaper', 'premium-wallpaper']
|
||||||
CANVAS_MATERIALS = ['standard-canvas']
|
CANVAS_MATERIALS = ['standard-canvas']
|
||||||
|
|
||||||
id = db.Column('materialid', db.Integer, primary_key=True)
|
id = db.Column('materialid', db.Integer, primary_key=True)
|
||||||
name = db.Column('material', db.String(255), nullable=False)
|
name = db.Column('material', db.String(255), nullable=False)
|
||||||
material_price = db.relationship('MaterialPrice', uselist=False)
|
material_price = db.relationship('MaterialPrice', uselist=False)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -53,11 +54,11 @@ class Material(db.Model):
|
|||||||
|
|
||||||
class MaterialPrice(db.Model):
|
class MaterialPrice(db.Model):
|
||||||
|
|
||||||
__tablename__ = 'v_materialprice';
|
__tablename__ = 'v_materialprice'
|
||||||
|
|
||||||
|
|
||||||
groupid = db.Column(db.Integer)
|
groupid = db.Column(db.Integer)
|
||||||
materialid = db.Column(db.Integer, db.ForeignKey('product-materials.materialid'))
|
materialid = db.Column(db.Integer, db.ForeignKey(
|
||||||
|
'product-materials.materialid'))
|
||||||
price = db.Column(db.Numeric)
|
price = db.Column(db.Numeric)
|
||||||
|
|
||||||
__table_args__ = (db.PrimaryKeyConstraint(groupid, materialid),)
|
__table_args__ = (db.PrimaryKeyConstraint(groupid, materialid),)
|
||||||
|
|||||||
Reference in New Issue
Block a user