Mercurial > public > sg101
diff gpp/downloads/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 | 27bee3ac85e6 |
line wrap: on
line diff
--- a/gpp/downloads/views.py Mon May 03 02:59:48 2010 +0000 +++ b/gpp/downloads/views.py Wed May 05 03:12:15 2010 +0000 @@ -115,6 +115,7 @@ ####################################################################### @login_required +@require_POST def download(request, id): download = Download.public_objects.get(pk=id) if download is None: @@ -143,6 +144,7 @@ ####################################################################### @login_required +@require_POST def random_download(request): ids = Download.public_objects.values_list('id', flat=True) if not ids: