def index(content_id): content = Content.get_item_by_id(content_id) if (content is None): content = Content() content.id = content_id content.add_itself() content = Content.get_item_by_id(content_id) content.__dict__.pop('_sa_instance_state', None) return render_template('index.html', content=content.__dict__)
def show_content(content_id): content_json = request.get_json() content = Content.get_item_by_id(content_json['id']) content.links_data = str(content_json['links_data']) content.blocks_data = str(content_json['blocks_data']) content.add_itself() return str(content.id)