comparison 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
comparison
equal deleted inserted replaced
310:daa2916f5b34 311:b1c39788e511
1 """ 1 """
2 URLs for the donations application. 2 URLs for the donations application.
3 """ 3 """
4 from django.conf.urls.defaults import * 4 from django.conf.urls.defaults import *
5 from django.views.generic import TemplateView
5 6
6 urlpatterns = patterns('donations.views', 7 urlpatterns = patterns('donations.views',
7 url(r'^$', 'index', name='donations-index'), 8 url(r'^$', 'index', name='donations-index'),
8 url(r'^ipn/$', 'ipn', name='donations-ipn'), 9 url(r'^ipn/$', 'ipn', name='donations-ipn'),
9 ) 10 )
10 urlpatterns += patterns('django.views.generic.simple', 11 urlpatterns += patterns('',
11 (r'^thanks/$', 'direct_to_template', 12 url(r'^thanks/$', TemplateView.as_view(template_name='donations/thanks.html'),
12 {'template': 'donations/thanks.html'}, 'donations-thanks') 13 name='donations-thanks'),
13 ) 14 )