Mercurial > public > sg101
diff 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 |
line wrap: on
line diff
--- a/weblinks/views.py Tue Oct 14 15:14:50 2014 -0500 +++ b/weblinks/views.py Sun Oct 19 19:36:43 2014 -0500 @@ -191,6 +191,8 @@ def link_detail(request, id): link = get_object_or_404(Link, pk=id) + if not link.is_public: + raise Http404 return render_to_response('weblinks/link_detail.html', { 'link': link, },