forked from orbit-oss/flask
Fixed a bug in list_templates
This commit is contained in:
parent
8d2daea327
commit
c9a2ad2b8d
6 changed files with 23 additions and 5 deletions
|
|
@ -78,6 +78,8 @@ class DispatchingJinjaLoader(BaseLoader):
|
|||
pass
|
||||
|
||||
for blueprint in self.app.blueprints.itervalues():
|
||||
if blueprint_is_module(blueprint):
|
||||
continue
|
||||
loader = blueprint.jinja_loader
|
||||
if loader is not None:
|
||||
yield loader, template
|
||||
|
|
@ -93,7 +95,7 @@ class DispatchingJinjaLoader(BaseLoader):
|
|||
if loader is not None:
|
||||
for template in loader.list_templates():
|
||||
prefix = ''
|
||||
if not blueprint_is_module(blueprint):
|
||||
if blueprint_is_module(blueprint):
|
||||
prefix = name + '/'
|
||||
result.add(prefix + template)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue