本文整理汇总了Python中config.Configuration.logging_policy方法的典型用法代码示例。如果您正苦于以下问题:Python Configuration.logging_policy方法的具体用法?Python Configuration.logging_policy怎么用?Python Configuration.logging_policy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类config.Configuration
的用法示例。
在下文中一共展示了Configuration.logging_policy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: flask_scoped_session
# 需要导入模块: from config import Configuration [as 别名]
# 或者: from config.Configuration import logging_policy [as 别名]
testing = 'TESTING' in os.environ
db_url = Configuration.database_url(testing)
SessionManager.initialize(db_url)
session_factory = SessionManager.sessionmaker(db_url)
_db = flask_scoped_session(session_factory, app)
SessionManager.initialize_data(_db)
app.config['BABEL_DEFAULT_LOCALE'] = LanguageCodes.three_to_two[Configuration.localization_languages()[0]]
app.config['BABEL_TRANSLATION_DIRECTORIES'] = "../translations"
babel = Babel(app)
import routes
if Configuration.get(Configuration.INCLUDE_ADMIN_INTERFACE):
import admin.routes
debug = Configuration.logging_policy().get("level") == 'DEBUG'
logging.getLogger().info("Application debug mode==%r" % debug)
app.config['DEBUG'] = debug
app.debug = debug
def run():
debug = True
url = Configuration.integration_url(
Configuration.CIRCULATION_MANAGER_INTEGRATION, required=True)
scheme, netloc, path, parameters, query, fragment = urlparse.urlparse(url)
if ':' in netloc:
host, port = netloc.split(':')
port = int(port)
else:
host = netloc
port = 80