示例#1
0
文件: manage.py 项目: mayude/myblog
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
示例#2
0
 def create_app(self):
     app = _create_app('test')
     return app
示例#3
0
 def create_app(self):
     return _create_app('config.py')
示例#4
0
文件: app.py 项目: puzzle9/FaceApi
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')
示例#5
0
 def create_app(self):
     return _create_app(config=TestConfig)