def forum_running(): list=[] for i in range(1,3): r = ForumInfo() r.forumId=i r.forumName='name for ' + str(i) list.append(r) return jsonify(list[0].__dict__)
def add_forum(): forum = ForumInfo() forum.forumId=request.form['forumId'] forum.forumName=request.form['forumName'] forum._id=forum.forumId print(forum.__dict__) ms = MongoStore() ms.open() ms.saveForum(forum) return "OK"