MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / get_url

Method get_url

21-async/mojifinder/bottle.py:769–773  ·  view source on GitHub ↗

Return a string that matches a named route

(self, routename, **kargs)

Source from the content-addressed store, hash-verified

767 return self.router.match(environ)
768
769 def get_url(self, routename, **kargs):
770 """ Return a string that matches a named route """
771 scriptname = request.environ.get('SCRIPT_NAME', '').strip('/') + '/'
772 location = self.router.build(routename, **kargs).lstrip('/')
773 return urljoin(urljoin('/', scriptname), location)
774
775 def add_route(self, route):
776 ''' Add a route object, but do not change the :data:`Route.app`

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected