SHARE
TWEET

asssdf

a guest Sep 24th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @app.route('/seepati', methods=['POST', 'GET'])
  2. def seepati():
  3.     if 'username' in session:
  4.         muser = session['username']
  5.         mans = mongo.db.mans
  6.         tresult = mongo.db.tresult
  7.         a = mans.find_one({'especialista':muser})
  8.         if a:
  9.             saida = a['username']
  10.             tresult = tresult.find({'username':saida})
  11.             output = []
  12.             for t in tresult:
  13.                 output.append({'username':t['username'], 'data':t['data']})
  14.             return jsonify({'result': output})
  15.         else:
  16.             return redirect(url_for('deuerrado'))
  17.     return render_template('index.html')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top