Commits

Kiran Jonnalagadda committed e49ebbb Draft

Fix to make Jinja's 'include' and 'import' directives work with Flask 0.8 and blueprints.

  • Participants
  • Parent commits 94fa6c4

Comments (0)

Files changed (1)

flaskext/themes.py

 @contextfunction
 def global_theme_template(ctx, templatename, fallback=True):
     theme = active_theme(ctx)
-    templatepath = '_themes/%s/%s' % (theme, templatename)
+    if USING_BLUEPRINTS:
+        templatepath = '%s/%s' % (theme, templatename)
+    else:
+        templatepath = '_themes/%s/%s' % (theme, templatename)
     if (not fallback) or template_exists(templatepath):
         return templatepath
     else: