Skip to content
Myr

Provide ways to override the url rule

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 26e748c · Browse files · 1 file+7 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−1 removed

  • other:+7 added−1 removed

1 file+7 added−1 removed

modified:flask/app.py+7 added-1 removed
198 unmodified lines
199 'SERVER_NAME': None,200 'MAX_CONTENT_LENGTH': None201 })202203 #: The rule object to use for URL rules created. This is used by204 #: :meth:`add_url_rule`. Defaults to :class:`werkzeug.routing.Rule`.205 #:206 #: .. versionadded:: 0.7207 url_rule_class = Rule208209 #: the test client that is used with when `test_client` is used.210 #:211 #: .. versionadded:: 0.7212 test_client_class = None
365 unmodified lines
578 provide_automatic_options = False579 if 'OPTIONS' not in methods:580 methods = tuple(methods) + ('OPTIONS',)581 provide_automatic_options = True576 rule = Rule(rule, methods=methods, **options)582 rule = self.url_rule_class(rule, methods=methods, **options)583 rule.provide_automatic_options = provide_automatic_options584 self.url_map.add(rule)585 if view_func is not None:586 self.view_functions[endpoint] = view_func
428 unmodified lines