diff mysite/band/views.py @ 29:f61db5f82549

When displaying photos, display by id, ascending.
author Brian Neal <bgneal@gmail.com>
date Tue, 05 Apr 2011 23:05:55 +0000
parents a404f93a68d3
children 25e00d1b99bf
line wrap: on
line diff
--- a/mysite/band/views.py	Thu Mar 31 00:14:34 2011 +0000
+++ b/mysite/band/views.py	Tue Apr 05 23:05:55 2011 +0000
@@ -182,9 +182,10 @@
 
 def photo_detail(request, id):
    gallery = get_object_or_404(Gallery, pk = id)
+   photos = gallery.photos.order_by('id')
    return render_to_response('band/photo_detail.html',
-         { 'gallery' : gallery },
-         context_instance = RequestContext(request))
+       {'gallery' : gallery, 'photos': photos },
+       context_instance = RequestContext(request))
 
 #######################################################################