comparison 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
comparison
equal deleted inserted replaced
28:a404f93a68d3 29:f61db5f82549
180 180
181 ####################################################################### 181 #######################################################################
182 182
183 def photo_detail(request, id): 183 def photo_detail(request, id):
184 gallery = get_object_or_404(Gallery, pk = id) 184 gallery = get_object_or_404(Gallery, pk = id)
185 photos = gallery.photos.order_by('id')
185 return render_to_response('band/photo_detail.html', 186 return render_to_response('band/photo_detail.html',
186 { 'gallery' : gallery }, 187 {'gallery' : gallery, 'photos': photos },
187 context_instance = RequestContext(request)) 188 context_instance = RequestContext(request))
188 189
189 ####################################################################### 190 #######################################################################
190 191
191 def videos_index(request): 192 def videos_index(request):
192 vidsets = Video_Set.objects.values('title', 'id').order_by('-date') 193 vidsets = Video_Set.objects.values('title', 'id').order_by('-date')