forked from orbit-oss/flask
Fixed an issue that broke url processors for blueprints. Added testcases
This commit is contained in:
parent
15372661af
commit
bd473c1587
2 changed files with 60 additions and 2 deletions
|
|
@ -56,7 +56,7 @@ class BlueprintSetupState(object):
|
|||
|
||||
#: A dictionary with URL defaults that is added to each and every
|
||||
#: URL that was defined with the blueprint.
|
||||
self.url_defaults = dict(self.blueprint.url_defaults)
|
||||
self.url_defaults = dict(self.blueprint.url_values_defaults)
|
||||
self.url_defaults.update(self.options.get('url_defaults', ()))
|
||||
|
||||
def add_url_rule(self, rule, endpoint=None, view_func=None, **options):
|
||||
|
|
@ -102,7 +102,7 @@ class Blueprint(_PackageBoundObject):
|
|||
self.view_functions = {}
|
||||
if url_defaults is None:
|
||||
url_defaults = {}
|
||||
self.url_defaults = url_defaults
|
||||
self.url_values_defaults = url_defaults
|
||||
|
||||
def record(self, func):
|
||||
"""Registers a function that is called when the blueprint is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue