Mercurial > public > sg101
diff gpp/donations/urls.py @ 311:b1c39788e511
Fix #146; use new class-based generic views as function-based generic views are now deprecated.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 20 Jan 2011 04:40:14 +0000 |
parents | 296b610ee507 |
children | ddd69a8e07c7 |
line wrap: on
line diff
--- a/gpp/donations/urls.py Thu Jan 20 04:03:48 2011 +0000 +++ b/gpp/donations/urls.py Thu Jan 20 04:40:14 2011 +0000 @@ -2,12 +2,13 @@ URLs for the donations application. """ from django.conf.urls.defaults import * +from django.views.generic import TemplateView urlpatterns = patterns('donations.views', url(r'^$', 'index', name='donations-index'), url(r'^ipn/$', 'ipn', name='donations-ipn'), ) -urlpatterns += patterns('django.views.generic.simple', - (r'^thanks/$', 'direct_to_template', - {'template': 'donations/thanks.html'}, 'donations-thanks') +urlpatterns += patterns('', + url(r'^thanks/$', TemplateView.as_view(template_name='donations/thanks.html'), + name='donations-thanks'), )