Skip to content
Myr

Merge pull request #3069 from shidenggui/feature_allow_customizing_url_map

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

Allow customizing url map class

authored by David Lord · committed by GitHub · parents b0185a6, 2a2a11b · Browse files · 2 files+9 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

2 files+9 added−1 removed

  • other:+9 added−1 removed

2 files+9 added−1 removed

modified:flask/app.py+7 added-1 removed
348 unmodified lines
349 #:350 #: .. versionadded:: 0.7351 url_rule_class = Rule352353 #: The map object to use for storing the URL rules and routing354 #: configuration parameters. Defaults to :class:`werkzeug.routing.Map`.355 #:356 #: .. versionadded:: 1.1.0357 url_map_class = Map358359 #: the test client that is used with when `test_client` is used.360 #:361 #: .. versionadded:: 0.7362 test_client_class = None
209 unmodified lines
572 #: for value in values)573 #:574 #: app = Flask(__name__)575 #: app.url_map.converters['list'] = ListConverter570 self.url_map = Map()576 self.url_map = self.url_map_class()577578 self.url_map.host_matching = host_matching579 self.subdomain_matching = subdomain_matching580
1833 unmodified lines
modified:CHANGES.rst+2 added
38 unmodified lines
39- Support ``static_url_path`` that ends with a forward slash.40 :issue:`3134`41- :meth:`jsonify` supports :class:`dataclasses.dataclass` objects.42 :pr:`3195`43- Allow customizing the :attr:`Flask.url_map_class` used for routing.44 :pr:`3069`4546.. _#2935: https://github.com/pallets/flask/issues/293547.. _#2957: https://github.com/pallets/flask/issues/295748.. _#2994: https://github.com/pallets/flask/pull/2994
948 unmodified lines