]> git.sommitrealweird.co.uk Git - sommitrealweird.git/commitdiff
Sort Albums by Name
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Sun, 29 Mar 2009 20:49:07 +0000 (21:49 +0100)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Sun, 29 Mar 2009 20:49:07 +0000 (21:49 +0100)
sommitrealweird/photo/urls.py

index 8a17fd3b01f6cfa1c97372537b2f5cb9806f2709..64026ce61393d68e2b51627fd8ce5eb9b7e0b797 100644 (file)
@@ -2,7 +2,7 @@ from django.conf.urls.defaults import *
 from models import Album
 
 urlpatterns = patterns('',
-    (r'^$', 'django.views.generic.list_detail.object_list', { "paginate_by": 20, "queryset": Album.objects.all(), "template_name": "photo/album_index.html"}),
+    (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<slug>[^/]*)/$', 'photo.views.album_view'),
     (r'^(?P<slug>[^/]*)/(?P<id>[0-9]+)/$', 'photo.views.photo_view'),
 )