带维护模式的金字塔花呢
pyramid_maintenance的Python项目详细描述
Author: | Benoît Pineau <beny@sickless.net> |
---|---|
Date: | 2014-02-12 |
它是什么
金字塔维护是一种金字塔花呢。
此tween允许您将应用程序置于维护模式(仅为所有路由呈现一个特定模板),但允许具有特定权限的用户“正常”访问您的应用程序。
如何安装
pip install pyramid_maintenance
如何启用它
如果要在金字塔应用程序中启用金字塔之间的维护,则必须添加.ini文件:
pyramid.tweens = pyramid_maintenance.tween_maintenance
并定义以下设置:
# List of permissions (separeted by comma, space, carriage return and/or new line). # The pyramid app isn't in maintenance mode for people who have one of these permissions. pyramid_maintenance.permissions = permission1, permission2 # Relative path from defined template location directories. pyramid_maintenance.template = template.mako
0.2
- 使您在.ini文件上无限制
- 将角色重命名为权限
0.1
- 初始版本