Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Get rid of vestigial django_website.views.

  • Loading branch information...
commit b50caf0057f3fd7ab9859534e340076d568ad38b 1 parent b76acc1
Aymeric Augustin authored February 08, 2013
9  django_website/views.py
... ...
@@ -1,9 +0,0 @@
1  
-from django.shortcuts import render
2  
-from django.views.decorators.csrf import requires_csrf_token
3  
-
4  
-@requires_csrf_token
5  
-def server_error(request, template_name='500.html'):
6  
-    """
7  
-    Custom 500 error handler for static stuff.
8  
-    """
9  
-    return render(request, template_name)
10  django_www/urls.py
@@ -4,8 +4,9 @@
4 4
 from django.contrib import admin
5 5
 from django.contrib.flatpages.views import flatpage
6 6
 from django.contrib.sitemaps import views as sitemap_views
  7
+from django.shortcuts import render
7 8
 from django.views.decorators.cache import cache_page
8  
-from django.views.decorators.csrf import csrf_exempt
  9
+from django.views.decorators.csrf import csrf_exempt, requires_csrf_token
9 10
 from django.views.generic import RedirectView, TemplateView
10 11
 
11 12
 from accounts import views as account_views
@@ -21,9 +22,6 @@
21 22
     'flatpages': FlatPageSitemap,
22 23
 }
23 24
 
24  
-handler500 = 'django_website.views.server_error'
25  
-
26  
-
27 25
 urlpatterns = patterns('',
28 26
     url(r'^$', TemplateView.as_view(template_name='homepage.html'), name="homepage"),
29 27
     url(r'^accounts/', include('accounts.urls')),
@@ -54,3 +52,7 @@
54 52
     url(r'^svntogit/', include('svntogit.urls')),
55 53
     url(r'', include('legacy.urls')),
56 54
 )
  55
+
  56
+@requires_csrf_token
  57
+def handler500(request):
  58
+    return render(request, '500.html')

0 notes on commit b50caf0

Please sign in to comment.
Something went wrong with that request. Please try again.