From 88a5f17d25a25dbd2ebcf905dcecc45ce78a1615 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sun, 22 Feb 2015 15:40:04 +0100 Subject: [PATCH] Fixed #24389 -- Isolated the CSRF view from the TEMPLATES setting. Thanks uranusjr for the report and analysis. --- django/views/csrf.py | 10 +++++----- tests/view_tests/tests/test_csrf.py | 13 ++++++++++++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/django/views/csrf.py b/django/views/csrf.py index aa227d3b6e..9ab9c44171 100644 --- a/django/views/csrf.py +++ b/django/views/csrf.py @@ -1,6 +1,6 @@ from django.conf import settings from django.http import HttpResponseForbidden -from django.template import Context, Template +from django.template import Context, Engine from django.utils.translation import ugettext as _ from django.utils.version import get_docs_version @@ -67,9 +67,9 @@ CSRF_FAILURE_TEMPLATE = """