945 | | return self.nodelist.render(context_class(dict, |
946 | | autoescape=context.autoescape)) |
| 945 | new_context = context_class(dict, autoescape=context.autoescape) |
| 946 | # Copy across the CSRF token, if present, because inclusion |
| 947 | # tags are often used for forms, and we need instructions |
| 948 | # for using CSRF protection to be as simple as possible. |
| 949 | csrf_token = context.get('csrf_token', None) |
| 950 | if csrf_token is not None: |
| 951 | new_context['csrf_token'] = csrf_token |
| 952 | return self.nodelist.render(new_context) |