本文整理匯總了Python中repoze.bfg.configuration.Configurator.setup_registry方法的典型用法代碼示例。如果您正苦於以下問題:Python Configurator.setup_registry方法的具體用法?Python Configurator.setup_registry怎麽用?Python Configurator.setup_registry使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類repoze.bfg.configuration.Configurator
的用法示例。
在下文中一共展示了Configurator.setup_registry方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _registerComponents
# 需要導入模塊: from repoze.bfg.configuration import Configurator [as 別名]
# 或者: from repoze.bfg.configuration.Configurator import setup_registry [as 別名]
def _registerComponents(self):
# Install a bit of configuration that make_app() usually
# does for us.
reg = get_current_registry()
config = Configurator(reg)
config.setup_registry()
config.load_zcml('opencore.includes:configure.zcml')
示例2: _registerComponents
# 需要導入模塊: from repoze.bfg.configuration import Configurator [as 別名]
# 或者: from repoze.bfg.configuration.Configurator import setup_registry [as 別名]
def _registerComponents(self):
# Install a bit of configuration that make_app() usually
# does for us.
reg = get_current_registry()
config = Configurator(reg)
config.setup_registry()
config.load_zcml('karl.includes:configure.zcml')
from zope.interface import Interface
testing.registerAdapter(DummyToolAddables, (Interface, Interface),
IToolAddables)