Exemplo n.º 1
0
 def post(self):
     talk = Talk.objects(id=flask.request.form['talk_id'])
     talk = (len(talk) > 0) and talk[0]
     topic = Topic(name=flask.request.form['name']).save()
     talk.topics.append(topic)
     talk.save()
     return flask.jsonify(talk=json.loads(talk.to_json()))
Exemplo n.º 2
0
 def post(self):
     talk = Talk.objects(id=flask.request.form['talk_id'])
     talk = (len(talk)>0) and talk[0]
     topic = Topic(name=flask.request.form['name']).save()
     talk.topics.append(topic)
     talk.save()
     return flask.jsonify(talk=json.loads(talk.to_json()))
Exemplo n.º 3
0
 def get(self, talk_id):
     talk = Talk.objects(id=talk_id)
     talk = (len(talk) > 0) and talk[0]
     rtn = format_talk(talk.to_json())
     return flask.render_template('talks.html',
                                  talk=rtn,
                                  talk_id=talk_id,
                                  is_edit_mode=is_edit())
Exemplo n.º 4
0
 def get(self,talk_id):
     talk = Talk.objects(id=talk_id)
     talk = (len(talk)>0) and talk[0]
     rtn = format_talk(talk.to_json())
     return flask.render_template('talks.html',talk=rtn,talk_id=talk_id,is_edit_mode=is_edit())