Skip to content
Snippets Groups Projects
Commit 44e401c9 authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[IMP] http.py: allow @route decorator to pass extra arguments to created werkzeug.routing.Rule

parent 4e617069
No related branches found
No related tags found
No related merge requests found
......@@ -803,7 +803,9 @@ def routing_map(modules, nodb_only, converters=None):
if url.endswith("/") and len(url) > 1:
url = url[: -1]
routing_map.add(werkzeug.routing.Rule(url, endpoint=endpoint, methods=routing['methods']))
xtra_keys = 'defaults subdomain build_only strict_slashes redirect_to alias host'.split()
kw = {k: routing[k] for k in xtra_keys if k in routing}
routing_map.add(werkzeug.routing.Rule(url, endpoint=endpoint, methods=routing['methods'], **kw))
return routing_map
#----------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment