diff gpp/weblinks/views.py @ 208:2022c0409296

Fix #76; use POST to get downloads to avoid having side-effects (updating hit count) on GETs.
author Brian Neal <bgneal@gmail.com>
date Wed, 05 May 2010 03:12:15 +0000
parents b4305e18d3af
children 7e8d2dda99e3
line wrap: on
line diff
--- a/gpp/weblinks/views.py	Mon May 03 02:59:48 2010 +0000
+++ b/gpp/weblinks/views.py	Wed May 05 03:12:15 2010 +0000
@@ -140,12 +140,14 @@
 
 #######################################################################
 
+@require_POST
 def visit(request, link_id):
    link = get_object_or_404(Link, pk = link_id)
    return _visit_link(request, link)
 
 #######################################################################
 
+@require_POST
 def random_link(request):
    ids = Link.public_objects.values_list('id', flat=True)
    if not ids: