summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/views/defaults.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/views/defaults.py b/django/views/defaults.py
index 68b9ad697c..08c49e0ca4 100644
--- a/django/views/defaults.py
+++ b/django/views/defaults.py
@@ -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 @@ def page_not_found(request, template_name='404.html'):
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.