Fix nested blueprint url_prefix
This fixes the case where the blueprint is registered with a url_prefix but any child blueprints have no prefixes.
This commit is contained in:
parent
f64fff6476
commit
6fbdeb80c7
2 changed files with 16 additions and 0 deletions
|
|
@ -354,6 +354,8 @@ class Blueprint(Scaffold):
|
|||
bp_options["url_prefix"] = (
|
||||
state.url_prefix.rstrip("/") + "/" + bp_url_prefix.lstrip("/")
|
||||
)
|
||||
else:
|
||||
bp_options["url_prefix"] = state.url_prefix
|
||||
|
||||
bp_options["name_prefix"] = options.get("name_prefix", "") + self.name + "."
|
||||
blueprint.register(app, bp_options)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue