Author: lukeplant Date: 2010-10-26 13:11:22 -0500 (Tue, 26 Oct 2010) New Revision: 14357
Modified: django/branches/releases/1.2.X/django/views/defaults.py Log: [1.2.X] Fixed #14565 - No csrf_token on 404 pages Thanks to gvangool for report and patch. Backport of [14356] from trunk. Modified: django/branches/releases/1.2.X/django/views/defaults.py =================================================================== --- django/branches/releases/1.2.X/django/views/defaults.py 2010-10-26 18:09:20 UTC (rev 14356) +++ django/branches/releases/1.2.X/django/views/defaults.py 2010-10-26 18:11:22 UTC (rev 14357) @@ -1,6 +1,8 @@ from django import http from django.template import Context, RequestContext, loader +from django.views.decorators.csrf import csrf_protect +...@csrf_protect def page_not_found(request, template_name='404.html'): """ Default 404 handler. @@ -13,6 +15,7 @@ t = loader.get_template(template_name) # You need to create a 404.html template. return http.HttpResponseNotFound(t.render(RequestContext(request, {'request_path': request.path}))) +...@csrf_protect def server_error(request, template_name='500.html'): """ 500 error handler. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.