Code

Ticket #15070: 15070.diff

File 15070.diff, 790 bytes (added by raony, 3 years ago)
Line 
1Index: django/template/base.py
2===================================================================
3--- django/template/base.py     (revision 15186)
4+++ django/template/base.py     (working copy)
5@@ -927,7 +927,7 @@
6                         else:
7                             t = get_template(file_name)
8                         self.nodelist = t.nodelist
9-                    new_context = context_class(dict, autoescape=context.autoescape)
10+                    new_context = context_class(dict, autoescape=context.autoescape, current_app=context.current_app)
11                     # Copy across the CSRF token, if present, because inclusion
12                     # tags are often used for forms, and we need instructions
13                     # for using CSRF protection to be as simple as possible.