from django.conf.urls.defaults import * from django.views.generic import list_detail from django.views.generic.simple import redirect_to urlpatterns = patterns('', (r'(?P[-\w]+)/(?P\d+)/$', 'photos.views.gallery_list_by_area'), (r'(?P\d+)/$', 'photos.views.gallery_list'), (r'(?P[-\w]+)/$', redirect_to, {'url': '/photos/%(slug)s/1/'}), (r'', redirect_to, {'url': '/photos/1/'}), )