annotate antispam/views.py @ 953:8647a669edb4

Fix excessive cache usage for forum date/times. Issue #84. Hitting the cache 30+ times while browsing the forums to adjust all the dates/times into the user's time zone. Just hit the user's profile and be done with it. It should be loaded.
author Brian Neal <bgneal@gmail.com>
date Tue, 19 May 2015 21:08:45 -0500
parents a8dc08cc5db4
children e932f2ecd4a7
rev   line source
bgneal@215 1 """Views for the antispam application."""
bgneal@215 2
bgneal@215 3 from django.shortcuts import render_to_response
bgneal@215 4 from django.template import RequestContext
bgneal@215 5
bgneal@215 6
bgneal@215 7 def suspended(request):
bgneal@215 8 """This view checks the user's status for suspension and displays an
bgneal@215 9 appropriate message.
bgneal@215 10 """
bgneal@215 11 is_active = request.user.is_active
bgneal@215 12
bgneal@215 13 return render_to_response('antispam/suspended.html', {
bgneal@215 14 'is_active': is_active,
bgneal@689 15 },
bgneal@215 16 context_instance = RequestContext(request))