From 01976a496f04b06941b601cdef55dd37870d452f Mon Sep 17 00:00:00 2001 From: Brett Parker Date: Sun, 29 Mar 2009 21:49:07 +0100 Subject: [PATCH 1/1] Sort Albums by Name --- sommitrealweird/photo/urls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sommitrealweird/photo/urls.py b/sommitrealweird/photo/urls.py index 8a17fd3..64026ce 100644 --- a/sommitrealweird/photo/urls.py +++ b/sommitrealweird/photo/urls.py @@ -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[^/]*)/$', 'photo.views.album_view'), (r'^(?P[^/]*)/(?P[0-9]+)/$', 'photo.views.photo_view'), ) -- 2.39.5