Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @app.route('/seepati', methods=['POST', 'GET'])
- def seepati():
- if 'username' in session:
- muser = session['username']
- mans = mongo.db.mans
- tresult = mongo.db.tresult
- a = mans.find_one({'especialista':muser})
- if a:
- saida = a['username']
- tresult = tresult.find({'username':saida})
- output = []
- for t in tresult:
- output.append({'username':t['username'], 'data':t['data']})
- return jsonify({'result': output})
- else:
- return redirect(url_for('deuerrado'))
- return render_template('index.html')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement