1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #24538 -- Allowed self in Jinja context

Rendering a Jinja template with self in the context threw an error.
While self is a reserved variable in Jinja, including self in the
context is not an error, so Django should respect that.
This commit is contained in:
Tim Heap
2015-03-31 15:37:17 +11:00
committed by Tim Graham
parent 48ddc66219
commit 4ea1909d3c
2 changed files with 19 additions and 1 deletions

View File

@@ -60,4 +60,4 @@ class Template(object):
context['request'] = request
context['csrf_input'] = csrf_input_lazy(request)
context['csrf_token'] = csrf_token_lazy(request)
return self.template.render(**context)
return self.template.render(context)