#24389: CSRF error page requires DjangoTemplates backend
---------------------------------+--------------------------------------
Reporter: uranusjr | Owner: nobody
Type: Bug | Status: new
Component: Template system | Version: 1.8alpha1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+--------------------------------------
Comment (by uranusjr):
I dug into this a bit, and the reason this is happening is that
django.views.csrf.csrf_failure is hard-wired to use
django.template.Template, while other error pages (in django.views.debug)
use Engine(debug=True).from_string instead. Changing
{{{
t = Template(CSRF_FAILURE_TEMPLATE)
}}}
to
{{{
t = Engine().from_string(CSRF_FAILURE_TEMPLATE)
}}}
resolves the problem. Should this be configured with debug=True as in
django.views.debug? Things seem to work both with and without that
parameter.
--
Ticket URL: <https://code.djangoproject.com/ticket/24389#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.dad7db74cab42dc347fd0fcda045533d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.