本文整理汇总了Python中tg.configuration.AppConfig.use_toscawidgets方法的典型用法代码示例。如果您正苦于以下问题:Python AppConfig.use_toscawidgets方法的具体用法?Python AppConfig.use_toscawidgets怎么用?Python AppConfig.use_toscawidgets使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tg.configuration.AppConfig
的用法示例。
在下文中一共展示了AppConfig.use_toscawidgets方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: asbool
# 需要导入模块: from tg.configuration import AppConfig [as 别名]
# 或者: from tg.configuration.AppConfig import use_toscawidgets [as 别名]
from paste.deploy.converters import asbool
setting = asbool(global_conf.get('the_setting'))
"""
from tg.configuration import AppConfig
import outages
from outages import model
from outages.lib import app_globals, helpers
base_config = AppConfig()
base_config.renderers = []
base_config.package = outages
#Enable json in expose
base_config.renderers.append('json')
#Set the default renderer
base_config.default_renderer = 'mako'
base_config.renderers.append('mako')
#Configure the base SQLALchemy Setup
base_config.use_sqlalchemy = True
base_config.model = outages.model
base_config.DBSession = outages.model.DBSession
base_config.use_toscawidgets = False
base_config.use_toscawidgets2 = True
示例2: AppConfig
# 需要导入模块: from tg.configuration import AppConfig [as 别名]
# 或者: from tg.configuration.AppConfig import use_toscawidgets [as 别名]
"""
from tg.configuration import AppConfig
import teste
from teste import model
from teste.lib import app_globals, helpers
base_config = AppConfig()
base_config.renderers = []
base_config.package = teste
#Enable TW2
base_config.use_toscawidgets2 = True
base_config.use_toscawidgets = True
#Enable json in expose
base_config.renderers.append('json')
#Set the default renderer
base_config.default_renderer = 'genshi'
base_config.renderers.append('genshi')
#base_config.renderers.append('mako')
# if you want raw speed and have installed chameleon.genshi
# you should try to use this renderer instead.
# warning: for the moment chameleon does not handle i18n translations
#base_config.renderers.append('chameleon_genshi')
#Configure the base SQLALchemy Setup
base_config.use_sqlalchemy = True
base_config.model = teste.model
base_config.DBSession = teste.model.DBSession