summaryrefslogtreecommitdiff
path: root/news
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2014-10-19 14:19:05 -0500
committerDan McGee <dan@archlinux.org>2014-10-19 14:19:05 -0500
commit1ff2e37e049004852681794537417a1947bf6f18 (patch)
tree09ab371e9c0d8a4067ac04ea5715ae53ac2ae2b3 /news
parent7c26f6b7a4d29faede58d2feb13ef961e4725637 (diff)
Simplify last modified and etags processing for feeds
We had this elaborate system set up with caching and invalidation, which is overkill since we cache the result of the view anyway. Just hit the database when needed to find the last change to the respective model class and be done with it. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'news')
-rw-r--r--news/models.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/news/models.py b/news/models.py
index d51db7c7..985c1088 100644
--- a/news/models.py
+++ b/news/models.py
@@ -45,12 +45,9 @@ def set_news_fields(sender, **kwargs):
news.guid = 'tag:%s,%s:%s' % (Site.objects.get_current(),
current_time.strftime('%Y-%m-%d'), news.get_absolute_url())
-# connect signals needed to keep cache in line with reality
-from main.utils import refresh_latest
-from django.db.models.signals import pre_save, post_save
-post_save.connect(refresh_latest, sender=News,
- dispatch_uid="news.models")
+from django.db.models.signals import pre_save
+
pre_save.connect(set_news_fields, sender=News,
dispatch_uid="news.models")