Made it easier for extensions to register multiple blueprints at different URLs
The blueprint's own url_prefix='/xxx' setting is now taken into account.
This commit is contained in:
parent
8a6cd96198
commit
f21b708085
@ -197,7 +197,11 @@ class PillarServer(Eve):
|
||||
|
||||
# Load extension blueprint(s)
|
||||
for blueprint in pillar_extension.blueprints():
|
||||
self.register_blueprint(blueprint, url_prefix=url_prefix)
|
||||
if blueprint.url_prefix:
|
||||
blueprint_prefix = url_prefix + blueprint.url_prefix
|
||||
else:
|
||||
blueprint_prefix = url_prefix
|
||||
self.register_blueprint(blueprint, url_prefix=blueprint_prefix)
|
||||
|
||||
# Load template paths
|
||||
tpath = pillar_extension.template_path
|
||||
|
Loading…
x
Reference in New Issue
Block a user