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