X-Git-Url: https://git.sommitrealweird.co.uk/sommitrealweird.git/blobdiff_plain/01976a496f04b06941b601cdef55dd37870d452f..5d2c22628bbba4eb7ea12a1f5e11bdcc6c866e03:/sommitrealweird/photo/urls.py?ds=inline diff --git a/sommitrealweird/photo/urls.py b/sommitrealweird/photo/urls.py index 64026ce..dbea64f 100644 --- a/sommitrealweird/photo/urls.py +++ b/sommitrealweird/photo/urls.py @@ -1,8 +1,9 @@ -from django.conf.urls.defaults import * +from django.conf.urls import url from models import Album +from views import AlbumListView -urlpatterns = patterns('', - (r'^$', 'django.views.generic.list_detail.object_list', { "paginate_by": 20, "queryset": Album.objects.all().order_by('name'), "template_name": "photo/album_index.html"}), - (r'^(?P[^/]*)/$', 'photo.views.album_view'), - (r'^(?P[^/]*)/(?P[0-9]+)/$', 'photo.views.photo_view'), -) +urlpatterns = [ + url(r'^$', AlbumListView.as_view()), + url(r'^(?P[^/]*)/$', 'photo.views.album_view'), + url(r'^(?P[^/]*)/(?P[0-9]+)/$', 'photo.views.photo_view'), +]