# HG changeset patch # User Brian Neal # Date 1273460299 0 # Node ID 65016249bf35f1a271d73b2c63c2d4c8cb085879 # Parent fad7548b7f6eb5284c1ddfadeb0b21b60a317e99 See #31; undid attempts to clear template tag caching when saving news and bulletins, as we don't know the cache key (it is mangled). diff -r fad7548b7f6e -r 65016249bf35 gpp/bulletins/models.py --- a/gpp/bulletins/models.py Sun May 09 20:53:34 2010 +0000 +++ b/gpp/bulletins/models.py Mon May 10 02:58:19 2010 +0000 @@ -5,7 +5,6 @@ import datetime from django.db import models from django.db.models import Q -from django.core.cache import cache class BulletinManager(models.Manager): @@ -37,9 +36,3 @@ def __unicode__(self): return self.title - - def save(self, *args, **kwargs): - super(Bulletin, self).save(*args, **kwargs) - cache.delete('home_bulletins') - - diff -r fad7548b7f6e -r 65016249bf35 gpp/news/admin.py --- a/gpp/news/admin.py Sun May 09 20:53:34 2010 +0000 +++ b/gpp/news/admin.py Mon May 10 02:58:19 2010 +0000 @@ -5,7 +5,6 @@ from django.contrib import admin from django.conf import settings -from django.core.cache import cache from news.models import PendingStory from news.models import Story @@ -31,7 +30,6 @@ tags=pending_story.tags) story.save() pending_story.delete() - cache.delete('home_news') approve_story.short_description = "Approve selected pending stories" diff -r fad7548b7f6e -r 65016249bf35 gpp/news/models.py --- a/gpp/news/models.py Sun May 09 20:53:34 2010 +0000 +++ b/gpp/news/models.py Mon May 10 02:58:19 2010 +0000 @@ -5,7 +5,6 @@ import datetime from django.db import models from django.contrib.auth.models import User -from django.core.cache import cache from tagging.fields import TagField @@ -75,8 +74,3 @@ now = datetime.datetime.now() delta = now - self.date_submitted return self.allow_comments and delta.days < 30 - - def save(self, *args, **kwargs): - super(Story, self).save(*args, **kwargs) - cache.delete('home_news') -