本文整理汇总了Python中project.create_app方法的典型用法代码示例。如果您正苦于以下问题:Python project.create_app方法的具体用法?Python project.create_app怎么用?Python project.create_app使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类project
的用法示例。
在下文中一共展示了project.create_app方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_app
# 需要导入模块: import project [as 别名]
# 或者: from project import create_app [as 别名]
def create_app(self):
app.config.from_object('project.config.TestingConfig')
return app
示例2: create_app
# 需要导入模块: import project [as 别名]
# 或者: from project import create_app [as 别名]
def create_app(self):
app.config.from_object('project.config.DevelopmentConfig')
return app
示例3: create_app
# 需要导入模块: import project [as 别名]
# 或者: from project import create_app [as 别名]
def create_app(self):
app.config.from_object("project.config.TestingConfig")
return app
示例4: create_app
# 需要导入模块: import project [as 别名]
# 或者: from project import create_app [as 别名]
def create_app(self):
app.config.from_object("project.config.DevelopmentConfig")
return app
示例5: create_app
# 需要导入模块: import project [as 别名]
# 或者: from project import create_app [as 别名]
def create_app(self):
"""
Instructs Flask to run these commands when we request this group of tests to be run.
"""
# Sets the configuration of the application to 'TestingConfig' in order
# that the tests use db_test, not db_dev or db_prod.
app.config.from_object('config.TestingConfig')
# Sets the logger to only show ERROR level logs and worse. We don't want
# to print a million things when running tests.
logger.setLevel(logging.ERROR)
return app
示例6: create_app
# 需要导入模块: import project [as 别名]
# 或者: from project import create_app [as 别名]
def create_app(self):
app.config.from_object('config.DevelopmentConfig')
return app