main.py 550 B

12345678910111213141516171819202122232425262728
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. # aqui se cargan las configs y variables globales dentro
  4. # el contexto de la app en src/
  5. from flask import Flask
  6. import sys
  7. app = Flask(__name__, static_url_path='/static')
  8. import sqlite3
  9. from flask import Flask, request, session, g, redirect, url_for, \
  10. abort, render_template, flash
  11. import views
  12. import configs
  13. from database.database import db_session, db_session
  14. from database.database import engine
  15. @app.teardown_appcontext
  16. def shutdown_session(exception=None):
  17. db_session.remove()