示例#1
0
文件: run.py 项目: shunyata/nobooru
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)