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

Fixed #15070 -- Also pass current_app and use_l10n in inclusion_tags. Thanks, raony, mk and goodtune.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16117 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel
2011-04-28 13:41:28 +00:00
parent 07854d1c44
commit 2ac4f175ec
5 changed files with 46 additions and 1 deletions

View File

@@ -930,7 +930,11 @@ class Library(object):
else:
t = get_template(file_name)
self.nodelist = t.nodelist
new_context = context_class(dict, autoescape=context.autoescape)
new_context = context_class(dict, **{
'autoescape': context.autoescape,
'current_app': context.current_app,
'use_l10n': context.use_l10n,
})
# Copy across the CSRF token, if present, because inclusion
# tags are often used for forms, and we need instructions
# for using CSRF protection to be as simple as possible.