diff options
Diffstat (limited to 'app/photos/urls.py')
-rw-r--r-- | app/photos/urls.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/app/photos/urls.py b/app/photos/urls.py index d917d85..9ae065d 100644 --- a/app/photos/urls.py +++ b/app/photos/urls.py @@ -1,13 +1,11 @@ -from django.conf.urls.defaults import * -from django.views.generic import list_detail -from django.views.generic.simple import redirect_to - +from django.conf.urls import * +from django.views.generic.base import RedirectView urlpatterns = patterns('', (r'data/(?P<slug>[-\w]+)/$', 'photos.views.photo_json'), (r'galleries/(?P<slug>[-\w]+)/$', 'photos.views.gallery'), (r'(?P<page>\d+)/$', 'photos.views.gallery_list'), - (r'(?P<slug>[-\w]+)/$', redirect_to, {'url': '/photos/%(slug)s/1/'}), - (r'', redirect_to, {'url': '/photos/1/'}), -)
\ No newline at end of file + (r'(?P<slug>[-\w]+)/$', RedirectView.as_view(url="/photos/%(slug)s/1/")), + (r'', RedirectView.as_view(url="/photos/1/")), +) |