1. Zachary Voase
  2. djanjinja

Commits

Zachary Voase  committed fff2514

Minor bugfixing.

  • Participants
  • Parent commits 196b39e
  • Branches default

Comments (0)

Files changed (2)

File djanjinja/views.py

View file
     """Renders a given template name to a ``django.http.HttpResponse``."""
     
     return HttpResponse(
-        render_to_string(filename, context=context), mimetype=mimetype,
-        environment=environment)
+        render_to_string(filename, context=context, environment=environment),
+        mimetype=mimetype)
 
 
 def shortcuts_for_environment(environment):

File djanjinja_test/cache/views.py

View file
 import djanjinja
 
 
+local_env = djanjinja.get_env().copy()
+local_env.load('djanjinja', 'cache')
+
+
 def global_(request):
     """Renders a template which uses the global cache object."""
     
-    template = djanjinja.get_template('cache_global.txt')
+    template = local_env.get_template('cache_global.txt')
     content = template.render().strip()
     return HttpResponse(content=content)