diff options
Diffstat (limited to 'urls.py')
-rw-r--r-- | urls.py | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -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,12 +49,15 @@ 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'^hackers/$', 'userlist', { 'type':'hackers' }, 'page-devs'), + (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'^hackers/$', 'userlist', { 'type':'hackers' }, 'page-devs'), (r'^fellows/$', 'userlist', { 'type':'fellows' }, 'page-fellows'), - (r'^donate/$', 'donate', {}, 'page-donate'), + (r'^donate/$', 'donate', {}, 'page-donate'), (r'^download/$', 'download', {}, 'page-download'), ) @@ -69,6 +72,7 @@ urlpatterns += patterns('', (r'^mirrors/', include('mirrors.urls')), (r'^news/', include('news.urls')), (r'^packages/', include('packages.urls')), + (r'^releng/', include('releng.urls')), (r'^todo/', include('todolists.urls')), (r'^opensearch/packages/$', 'packages.views.opensearch', {}, 'opensearch-packages'), @@ -77,7 +81,7 @@ urlpatterns += patterns('', if settings.DEBUG == True: urlpatterns += patterns('', - (r'^media/(.*)$', 'django.views.static.serve', + (r'^media/(.*)$', 'django.views.static.serve', {'document_root': os.path.join(settings.DEPLOY_PATH, 'media')})) # vim: set ts=4 sw=4 et: |