Mercurial > public > sg101
view gpp/forums/management/commands/update_forum_stats.py @ 438:524fd1b3919a
Fixing #214; don't need a custom model search view. All the info is in the template. Wrote a template tag to extract the info from the request context and urlencode them.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 18 May 2011 03:04:25 +0000 |
parents | e10fa0d8e7ad |
children |
line wrap: on
line source
""" update_forum_stats.py - A management command to calculate and update the cache with the forum statistics. These are done out of the request / response cycle because doing a count on the Post table is expensive under MySQL and InnoDb. """ from django.core.management.base import NoArgsCommand, CommandError from forums.stats import update_stats class Command(NoArgsCommand): help = "Calculates and updates the cache with forums statistics" def handle_noargs(self, **opts): update_stats()