# HG changeset patch # User Brian Neal # Date 1295498414 0 # Node ID b1c39788e511a6552bdf5c3d03901fbf77be8831 # Parent daa2916f5b34e36ae35722a90e066ab7fb701c81 Fix #146; use new class-based generic views as function-based generic views are now deprecated. diff -r daa2916f5b34 -r b1c39788e511 gpp/donations/urls.py --- 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'), ) diff -r daa2916f5b34 -r b1c39788e511 gpp/messages/urls.py --- a/gpp/messages/urls.py Thu Jan 20 04:03:48 2011 +0000 +++ b/gpp/messages/urls.py Thu Jan 20 04:40:14 2011 +0000 @@ -1,5 +1,6 @@ """urls for the Messages application""" from django.conf.urls.defaults import * +from django.views.generic import RedirectView urlpatterns = patterns('messages.views', url(r'^inbox/$', 'inbox', name='messages-inbox'), @@ -16,7 +17,7 @@ url(r'^options/$', 'options', name='messages-options'), ) -urlpatterns += patterns('django.views.generic.simple', - (r'^$', 'redirect_to', {'url': 'inbox/'}), +urlpatterns += patterns('', + (r'^$', RedirectView.as_view(url='inbox/')), )