(self)
| 125 | path = "/admin(?:/.*)?" |
| 126 | |
| 127 | def delegate(self): |
| 128 | if web.ctx.path == "/admin": |
| 129 | return self.handle(admin_index) |
| 130 | |
| 131 | for t in admin_tasks: |
| 132 | m = re.compile("^" + t.path + "$").match(web.ctx.path) |
| 133 | if m: |
| 134 | return self.handle(t.cls, m.groups(), librarians=t.librarians) |
| 135 | raise web.notfound() |
| 136 | |
| 137 | def handle(self, cls, args=(), librarians=False): |
| 138 | # Use admin theme |