Пример #1
0
def run(debug=False, **kw):
    import app

    app_instance = app.create_app()
    app.connect_all(app_instance)

    # Create the sqlite database if it doesn't exist.
    if debug and not os.path.exists(config.SQLITE_DB_FILE):
        import database
        database.init_db()

    app_instance.run(debug=debug, **kw)
Пример #2
0
 def create_app(self):
     app = create_app(testing_config)
     connect_all(app)
     return app
Пример #3
0
# Target wsgi_shim:app with a wsgi server to run the app. wsgi needs a variable to use for requests.

from app import create_app, connect_all

app = create_app()
connect_all(app)