From 6b2d6e18338631367c5a61896d872dbe27d2097e Mon Sep 17 00:00:00 2001 From: Luke Plant Date: Sat, 22 May 2010 18:42:16 +0000 Subject: [PATCH] Fixed #13590 - Made CSRF failure page styling consistent with Django's default error page styling. Thanks to alefteris for suggestion. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13300 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/views/csrf.py | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/django/views/csrf.py b/django/views/csrf.py index aa5e25b5b4..fa996fff24 100644 --- a/django/views/csrf.py +++ b/django/views/csrf.py @@ -11,12 +11,30 @@ CSRF_FAILRE_TEMPLATE = """ + 403 Forbidden + -

403 Forbidden

+
+

Forbidden (403)

CSRF verification failed. Request aborted.

- {% if DEBUG %} +
+{% if DEBUG %} +

Help

{% if reason %}

Reason given for failure:

@@ -51,10 +69,12 @@ CSRF_FAILRE_TEMPLATE = """ and only the initial error message will be displayed.

You can customize this page using the CSRF_FAILURE_VIEW setting.

- {% else %} +
+{% else %} +

More information is available with DEBUG=True.

- - {% endif %} +
+{% endif %} """