changeset 213:65016249bf35

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).
author Brian Neal <bgneal@gmail.com>
date Mon, 10 May 2010 02:58:19 +0000
parents fad7548b7f6e
children 28988cce138b
files gpp/bulletins/models.py gpp/news/admin.py gpp/news/models.py
diffstat 3 files changed, 0 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- 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')
-
-     
--- 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"
 
--- 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')
-