Guest User

Untitled

a guest
Jan 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. # skysim/__init__.py
  2. from flask import Flask
  3.  
  4. app = Flask(__name__)
  5. from skysimulation.database import init_db,db_session
  6. skysimulation.database.init_db()
  7. @app.teardown_request
  8. def shutdown_session(exception=None):
  9. db_session.remove()
  10. import view_index # all views here
  11. app.secret_key = 'asdf'
  12.  
  13. if __name__ == "__main__":
  14. app.debug = True
  15. app.run(host="0.0.0.0")
Add Comment
Please, Sign In to add comment