Merge branch 'master' of github.com:mitsuhiko/flask
This commit is contained in:
commit
f92a275d54
11 changed files with 145 additions and 5 deletions
|
|
@ -945,11 +945,15 @@ class Flask(_PackageBoundObject):
|
|||
subdomain matching is in use.
|
||||
:param strict_slashes: can be used to disable the strict slashes
|
||||
setting for this rule. See above.
|
||||
:param endpoint: Since version 0.8 you can also pass the enpoint,
|
||||
it will be used instead of generating the endpoint
|
||||
from the function name.
|
||||
:param options: other options to be forwarded to the underlying
|
||||
:class:`~werkzeug.routing.Rule` object.
|
||||
"""
|
||||
def decorator(f):
|
||||
self.add_url_rule(rule, None, f, **options)
|
||||
endpoint = options.pop("endpoint", None)
|
||||
self.add_url_rule(rule, endpoint, f, **options)
|
||||
return f
|
||||
return decorator
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue