Mercurial > public > sg101
comparison gpp/messages/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 | 0dd8989abef2 |
children | 76ba9478ebbd |
comparison
equal
deleted
inserted
replaced
310:daa2916f5b34 | 311:b1c39788e511 |
---|---|
1 """urls for the Messages application""" | 1 """urls for the Messages application""" |
2 from django.conf.urls.defaults import * | 2 from django.conf.urls.defaults import * |
3 from django.views.generic import RedirectView | |
3 | 4 |
4 urlpatterns = patterns('messages.views', | 5 urlpatterns = patterns('messages.views', |
5 url(r'^inbox/$', 'inbox', name='messages-inbox'), | 6 url(r'^inbox/$', 'inbox', name='messages-inbox'), |
6 url(r'^outbox/$', 'outbox', name='messages-outbox'), | 7 url(r'^outbox/$', 'outbox', name='messages-outbox'), |
7 url(r'^trash/$', 'trash', name='messages-trash'), | 8 url(r'^trash/$', 'trash', name='messages-trash'), |
14 url(r'^undelete/$', 'undelete_bulk', name='messages-undelete_bulk'), | 15 url(r'^undelete/$', 'undelete_bulk', name='messages-undelete_bulk'), |
15 url(r'^undelete/(\d+)/$', 'undelete', name='messages-undelete'), | 16 url(r'^undelete/(\d+)/$', 'undelete', name='messages-undelete'), |
16 url(r'^options/$', 'options', name='messages-options'), | 17 url(r'^options/$', 'options', name='messages-options'), |
17 ) | 18 ) |
18 | 19 |
19 urlpatterns += patterns('django.views.generic.simple', | 20 urlpatterns += patterns('', |
20 (r'^$', 'redirect_to', {'url': 'inbox/'}), | 21 (r'^$', RedirectView.as_view(url='inbox/')), |
21 ) | 22 ) |
22 | 23 |