web.py application processor for enabling infogami and verifying admin permissions.
(handler)
| 7 | |
| 8 | |
| 9 | def admin_processor(handler): |
| 10 | """web.py application processor for enabling infogami and verifying admin permissions.""" |
| 11 | delegate.initialize_context() |
| 12 | delegate.context.features = [] |
| 13 | features.loadhook() |
| 14 | |
| 15 | # required to give a special look and feel in site template |
| 16 | delegate.context.setdefault("cssfile", "admin") |
| 17 | delegate.context.setdefault("usergroup", "admin") |
| 18 | |
| 19 | page = handler() |
| 20 | return render_template("site", page) |
| 21 | |
| 22 | |
| 23 | def notfound(): |
nothing calls this directly
no test coverage detected