Browse Source

block增加了edit功能 finished

master
邓淳远 4 years ago
parent
commit
141c62f0a8
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      APP/view/block.py

+ 6
- 0
APP/view/block.py View File

@ -145,6 +145,12 @@ def edit():
return json_util.dumps(ret)
item = db_session.query(Block).filter(Block.id==block_id).first()
type_item = item.type
if type_item == 'text' or type_item == 'url':
item.content_text = content
else:
item.content_pic = content
db_session.commit()
except BaseException as e:
print(str(e))
ret = {'msg': 'failed!'}

Loading…
Cancel
Save