MCPcopy
hub / github.com/mher/flower / rewrite_handler

Function rewrite_handler

flower/app.py:27–31  ·  view source on GitHub ↗
(handler, url_prefix)

Source from the content-addressed store, hash-verified

25
26# pylint: disable=consider-using-f-string
27def rewrite_handler(handler, url_prefix):
28 if isinstance(handler, url):
29 return url("/{}{}".format(url_prefix.strip("/"), handler.regex.pattern),
30 handler.handler_class, handler.kwargs, handler.name)
31 return ("/{}{}".format(url_prefix.strip("/"), handler[0]), handler[1])
32
33
34class Flower(tornado.web.Application):

Callers 3

__init__Method · 0.85

Calls

no outgoing calls

Tested by 2