add send to bottom property
This commit is contained in:
@@ -19,6 +19,12 @@ class Designer(db.Model):
|
||||
visible_productpage = db.Column(db.Integer(), nullable=False, default=1)
|
||||
visible_search = db.Column(db.Integer(), nullable=False, default=1)
|
||||
|
||||
@property
|
||||
def send_to_bottom(self):
|
||||
if self.sort_desc:
|
||||
return 1
|
||||
return 0
|
||||
|
||||
def to_json(self):
|
||||
return {
|
||||
'commission': self.commission,
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ def update_designer(designer):
|
||||
visible_list=designer.visible_list,
|
||||
visible_productpage=designer.visible_productpage,
|
||||
visible_designerpage=designer.visible_designerpage,
|
||||
send_to_bottom=designer.sort_desc,
|
||||
send_to_bottom=designer.send_to_bottom,
|
||||
no_follow=designer.no_follow,
|
||||
hidden=1,
|
||||
path="/designers/{}".format(designer.path)
|
||||
|
||||
Reference in New Issue
Block a user