summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-29 15:44:08 -0500
committerDan McGee <dan@archlinux.org>2011-04-07 17:03:33 -0500
commitb2f7cd61e89c59bb52a542f6667aabd53743681c (patch)
treeaf9c0737c0029c8b73df708306960d848386bcfe
parent77842a6c76095277b024505708bf528d455b9c89 (diff)
Convert generic views in urls.py to class-based
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--urls.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/urls.py b/urls.py
index 33319263..cc8b593a 100644
--- a/urls.py
+++ b/urls.py
@@ -4,7 +4,7 @@ from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
-from django.views.generic.simple import direct_to_template
+from django.views.generic import TemplateView
from feeds import PackageFeed, NewsFeed
import sitemaps
@@ -49,13 +49,16 @@ urlpatterns += patterns('django.contrib.auth.views',
# Public pages
urlpatterns += patterns('public.views',
(r'^$', 'index', {}, 'index'),
- (r'^about/$', direct_to_template, {'template': 'public/about.html'}, 'page-about'),
- (r'^art/$', direct_to_template, {'template': 'public/art.html'}, 'page-art'),
- (r'^svn/$', direct_to_template, {'template': 'public/svn.html'}, 'page-svn'),
+ (r'^about/$', TemplateView.as_view(template_name='public/about.html'),
+ {}, 'page-about'),
+ (r'^art/$', TemplateView.as_view(template_name='public/art.html'),
+ {}, 'page-art'),
+ (r'^svn/$', TemplateView.as_view(template_name='public/svn.html'),
+ {}, 'page-svn'),
(r'^developers/$', 'userlist', { 'type':'devs' }, 'page-devs'),
(r'^trustedusers/$', 'userlist', { 'type':'tus' }, 'page-tus'),
(r'^fellows/$', 'userlist', { 'type':'fellows' }, 'page-fellows'),
- (r'^donate/$', 'donate', {}, 'page-donate'),
+ (r'^donate/$', 'donate', {}, 'page-donate'),
(r'^download/$', 'download', {}, 'page-download'),
)