MCPcopy Create free account
hub / github.com/internetarchive/openlibrary / delegate

Method delegate

openlibrary/plugins/admin/code.py:127–135  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

handleMethod · 0.95
notfoundMethod · 0.80

Tested by

no test coverage detected