Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2014
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. from flask import Flask, session
  2.  
  3. app = Flask(__name__)
  4. app.debug = True                # Enable debug-mode
  5. app.secret_key = 'nosecret'
  6.  
  7.  
  8. @app.route('/')
  9. def index():
  10.     session['logged_in'] = True
  11.     print 'login1:', session['logged_in']
  12.     # sys.stdout.flush()
  13.     return 'ej '
  14.  
  15. @app.route('/something')
  16. def lala():
  17.     print session['logged_in']
  18.     return 'nr fhrnf'
  19.  
  20. if __name__ == '__main__':
  21.     app.run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement