def create_app(): app = _create_app() @app.shell_context_processor def make_shell_context(): return dict(app=app, db=db, create_db=create_db, drop_db=drop_db, UserModel=UserModel, create_user=create_user, PostModel=PostModel, TagModel=TagModel) print(app.url_map) print(app.config) return app
def create_app(self): app = _create_app('test') return app
def create_app(self): return _create_app('config.py')
from app import create_app as _create_app app = _create_app() def create_app(): return app if __name__ == '__main__': app.run(host='127.0.0.1', port='5050')
def create_app(self): return _create_app(config=TestConfig)