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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user