comparison gpp/downloads/views.py @ 23:a5f27f25fa52

Added a latest_downloads template tag. Made the comments view the details view for a download. Changed get_absolute_url to point to this new view.
author Brian Neal <bgneal@gmail.com>
date Sun, 19 Apr 2009 21:16:59 +0000
parents dbd703f7d63a
children 62eb9cbbcffc
comparison
equal deleted inserted replaced
22:42f22c56ab05 23:a5f27f25fa52
127 return HttpResponseRedirect(download.file.url) 127 return HttpResponseRedirect(download.file.url)
128 128
129 ####################################################################### 129 #######################################################################
130 130
131 @login_required 131 @login_required
132 def comments(request, id): 132 def details(request, id):
133 download = Download.public_objects.get(pk=id) 133 download = Download.public_objects.get(pk=id)
134 if download is None: 134 if download is None:
135 raise Http404 135 raise Http404
136 return render_to_response('downloads/download_comments.html', { 136 return render_to_response('downloads/download_detail.html', {
137 'download' : download, 137 'download' : download,
138 }, 138 },
139 context_instance = RequestContext(request)) 139 context_instance = RequestContext(request))
140 140
141 ####################################################################### 141 #######################################################################