Fixed a bug in list_templates

This commit is contained in:
Armin Ronacher 2011-07-16 01:16:03 +02:00
parent 8d2daea327
commit c9a2ad2b8d
6 changed files with 23 additions and 5 deletions

View file

@ -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)