Mercurial > public > sg101
diff 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 |
line wrap: on
line diff
--- 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/')), )