Mercurial > public > sg101
comparison weblinks/views.py @ 845:41d0389fc85a
For issue #78, check is_public before showing weblinks or downloads.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 19 Oct 2014 19:36:43 -0500 |
parents | 6e6492468bb8 |
children | e932f2ecd4a7 |
comparison
equal
deleted
inserted
replaced
844:6900400f971b | 845:41d0389fc85a |
---|---|
189 | 189 |
190 ####################################################################### | 190 ####################################################################### |
191 | 191 |
192 def link_detail(request, id): | 192 def link_detail(request, id): |
193 link = get_object_or_404(Link, pk=id) | 193 link = get_object_or_404(Link, pk=id) |
194 if not link.is_public: | |
195 raise Http404 | |
194 return render_to_response('weblinks/link_detail.html', { | 196 return render_to_response('weblinks/link_detail.html', { |
195 'link': link, | 197 'link': link, |
196 }, | 198 }, |
197 context_instance = RequestContext(request)) | 199 context_instance = RequestContext(request)) |