We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 298f3d3 commit 851f42bCopy full SHA for 851f42b
django/views/defaults.py
@@ -1,6 +1,8 @@
1
from django import http
2
from django.template import Context, RequestContext, loader
3
+from django.views.decorators.csrf import csrf_protect
4
5
+@csrf_protect
6
def page_not_found(request, template_name='404.html'):
7
"""
8
Default 404 handler.
@@ -13,6 +15,7 @@ def page_not_found(request, template_name='404.html'):
13
15
t = loader.get_template(template_name) # You need to create a 404.html template.
14
16
return http.HttpResponseNotFound(t.render(RequestContext(request, {'request_path': request.path})))
17
18
19
def server_error(request, template_name='500.html'):
20
21
500 error handler.
0 commit comments