forked from orbit-oss/flask
Record blueprint registration order.
This commit is contained in:
parent
750ab16364
commit
c09a4317e4
3 changed files with 14 additions and 3 deletions
|
|
@ -13,7 +13,6 @@ from jinja2 import BaseLoader, Environment as BaseEnvironment, \
|
|||
|
||||
from .globals import _request_ctx_stack, _app_ctx_stack
|
||||
from .signals import template_rendered
|
||||
from ._compat import itervalues, iteritems
|
||||
|
||||
|
||||
def _default_template_ctx_processor():
|
||||
|
|
@ -81,7 +80,7 @@ class DispatchingJinjaLoader(BaseLoader):
|
|||
if loader is not None:
|
||||
yield self.app, loader
|
||||
|
||||
for blueprint in itervalues(self.app.blueprints):
|
||||
for blueprint in self.app.iter_blueprints():
|
||||
loader = blueprint.jinja_loader
|
||||
if loader is not None:
|
||||
yield blueprint, loader
|
||||
|
|
@ -92,7 +91,7 @@ class DispatchingJinjaLoader(BaseLoader):
|
|||
if loader is not None:
|
||||
result.update(loader.list_templates())
|
||||
|
||||
for name, blueprint in iteritems(self.app.blueprints):
|
||||
for blueprint in self.app.iter_blueprints():
|
||||
loader = blueprint.jinja_loader
|
||||
if loader is not None:
|
||||
for template in loader.list_templates():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue