当前位置: 首页>>代码示例>>Python>>正文


Python AppConfig.vertex_latex_types方法代码示例

本文整理汇总了Python中tg.configuration.AppConfig.vertex_latex_types方法的典型用法代码示例。如果您正苦于以下问题:Python AppConfig.vertex_latex_types方法的具体用法?Python AppConfig.vertex_latex_types怎么用?Python AppConfig.vertex_latex_types使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tg.configuration.AppConfig的用法示例。


在下文中一共展示了AppConfig.vertex_latex_types方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1:

# 需要导入模块: from tg.configuration import AppConfig [as 别名]
# 或者: from tg.configuration.AppConfig import vertex_latex_types [as 别名]
base_config.use_sqlalchemy = True
base_config.model = vertex.model
base_config.DBSession = vertex.model.DBSession

# Configure the authentication backend
base_config.auth_backend = 'sqlalchemy'
base_config.sa_auth.dbsession = model.DBSession
# what is the class you want to use to search for users in the database
base_config.sa_auth.user_class = model.User
# what is the class you want to use to search for groups in the database
base_config.sa_auth.group_class = model.Group
# what is the class you want to use to search for permissions in the database
base_config.sa_auth.permission_class = model.Permission

# override this if you would like to provide a different who plugin for
# managing login and logout of your application
base_config.sa_auth.form_plugin = None

# You may optionally define a page where you want users to be redirected to
# on login:
base_config.sa_auth.post_login_url = '/post_login'

# You may optionally define a page where you want users to be redirected to
# on logout:
base_config.sa_auth.post_logout_url = '/post_logout'

base_config.sa_auth.cookie_secret = "mysupersecret" 

base_config.vertex_text_types = ['text/plain']
base_config.vertex_latex_types = ['text/x-tex', 'text/x-latex',
                                  'application/x-tex', 'application/x-latex']
开发者ID:jorgeatorres,项目名称:vertex,代码行数:33,代码来源:app_cfg.py


注:本文中的tg.configuration.AppConfig.vertex_latex_types方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。