Mercurial > public > sg101
annotate smiley/views.py @ 631:f36d1a168be7
For issue 27, disable login dialog button during POST.
This seems to prevent multiple logins most of the time. You can
still bang on the enter key and sometimes get more through.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 14 Nov 2012 20:57:05 -0600 |
parents | ee87ea74d46b |
children | e932f2ecd4a7 |
rev | line source |
---|---|
bgneal@12 | 1 """ |
bgneal@12 | 2 Views for the Smiley application. |
bgneal@12 | 3 """ |
bgneal@12 | 4 from django.shortcuts import render_to_response |
bgneal@12 | 5 from django.template import RequestContext |
bgneal@12 | 6 from django.contrib.auth.decorators import login_required |
bgneal@12 | 7 from django.views.decorators.http import require_GET |
bgneal@12 | 8 |
bgneal@12 | 9 from smiley.models import Smiley |
bgneal@12 | 10 |
bgneal@12 | 11 @login_required |
bgneal@12 | 12 @require_GET |
bgneal@123 | 13 def farm(request, extra=False): |
bgneal@12 | 14 return render_to_response('smiley/smiley_farm.html', { |
bgneal@123 | 15 'smilies': Smiley.objects.get_smilies(extra), |
bgneal@12 | 16 }, |
bgneal@12 | 17 context_instance = RequestContext(request)) |
bgneal@12 | 18 |