diff --git a/django/views/defaults.py b/django/views/defaults.py
index 68b9ad6..08c49e0 100644
a
|
b
|
|
1 | 1 | from django import http |
2 | 2 | from django.template import Context, RequestContext, loader |
| 3 | from django.views.decorators.csrf import csrf_protect |
3 | 4 | |
| 5 | @csrf_protect |
4 | 6 | def page_not_found(request, template_name='404.html'): |
5 | 7 | """ |
6 | 8 | Default 404 handler. |
… |
… |
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}))) |
15 | 17 | |
| 18 | @csrf_protect |
16 | 19 | def server_error(request, template_name='500.html'): |
17 | 20 | """ |
18 | 21 | 500 error handler. |