Mercurial > public > sg101
annotate gpp/smiley/views.py @ 120:f8f4514b806a
Added a 24-hour time preference flag in the user profile. Added forum template tags for showing forum dates/times adjusted for the user's time zone.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 25 Oct 2009 21:55:28 +0000 |
parents | f408971657b9 |
children | 3ae999b0c53b |
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@12 | 13 def farm(request): |
bgneal@12 | 14 return render_to_response('smiley/smiley_farm.html', { |
bgneal@12 | 15 'smilies': Smiley.objects.get_smilies(), |
bgneal@12 | 16 }, |
bgneal@12 | 17 context_instance = RequestContext(request)) |
bgneal@12 | 18 |
bgneal@12 | 19 # vim: ts=4 sw=4 |