本文整理匯總了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