X-Git-Url: https://git.sommitrealweird.co.uk/sommitrealweird.git/blobdiff_plain/acedb5e82f30e6502e2801db9f8d64d879f44347..4c8cb8b77590e3bbccb1fdf8dc05094b683a5a14:/sommitrealweird/photo/urls.py?ds=inline diff --git a/sommitrealweird/photo/urls.py b/sommitrealweird/photo/urls.py index 12c8dfb..3e9d28c 100644 --- a/sommitrealweird/photo/urls.py +++ b/sommitrealweird/photo/urls.py @@ -1,8 +1,9 @@ -from django.conf.urls.defaults import * -from models import Album +from django.conf.urls import url +from photo.models import Album +from photo.views import AlbumListView, PhotoListView, PhotoView -urlpatterns = patterns('', - (r'^$', 'django.views.generic.list_detail.object_list', { "paginate_by": 20, "queryset": Album.objects.all().order_by('name').reverse(), "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[^/]*)/$', PhotoListView.as_view()), + url(r'^(?P[^/]*)/(?P[0-9]+)/$', PhotoView.as_view()), +]