Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from flask import Flask, session
- app = Flask(__name__)
- app.debug = True # Enable debug-mode
- app.secret_key = 'nosecret'
- @app.route('/')
- def index():
- session['logged_in'] = True
- print 'login1:', session['logged_in']
- # sys.stdout.flush()
- return 'ej '
- @app.route('/something')
- def lala():
- print session['logged_in']
- return 'nr fhrnf'
- if __name__ == '__main__':
- app.run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement