Skip to content

Commit

Permalink
Allow customizing url map class
Browse files Browse the repository at this point in the history
  • Loading branch information
jon committed Jan 8, 2019
1 parent a74864e commit 1dbbc1a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion flask/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@ class Flask(_PackageBoundObject):
#: .. versionadded:: 0.7
url_rule_class = Rule

#: The map object to use for storing all the URL rules and some
#: configuration parameters. Defaults to :class:`werkzeug.routing.Map`.
#:
#: .. versionadded:: 1.1
url_map_class = Map

#: the test client that is used with when `test_client` is used.
#:
#: .. versionadded:: 0.7
Expand Down Expand Up @@ -539,7 +545,7 @@ def __init__(
#:
#: app = Flask(__name__)
#: app.url_map.converters['list'] = ListConverter
self.url_map = Map()
self.url_map = self.url_map_class()

self.url_map.host_matching = host_matching
self.subdomain_matching = subdomain_matching
Expand Down

0 comments on commit 1dbbc1a

Please sign in to comment.