summaryrefslogtreecommitdiff
path: root/news
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-04-07 16:52:52 -0500
committerDan McGee <dan@archlinux.org>2011-04-07 17:03:13 -0500
commit77842a6c76095277b024505708bf528d455b9c89 (patch)
tree686158efd744d0b35722df92cf91fa55a647e3e8 /news
parentd7665959652171b93db5e084c6738e8e1773e7f0 (diff)
Consolidate caching black magic
Get the stuff used to retrieve and refresh the latest date values all in the same place, and make it a bit more beautiful by refactoring it all into a common set of methods. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'news')
-rw-r--r--news/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/news/models.py b/news/models.py
index 17d51de9..5e467515 100644
--- a/news/models.py
+++ b/news/models.py
@@ -36,10 +36,10 @@ def set_news_fields(sender, **kwargs):
now.strftime('%Y-%m-%d'), news.get_absolute_url())
# connect signals needed to keep cache in line with reality
-from main.utils import refresh_news_latest
+from main.utils import refresh_latest
from django.db.models.signals import pre_save, post_save
-post_save.connect(refresh_news_latest, sender=News,
+post_save.connect(refresh_latest, sender=News,
dispatch_uid="news.models")
pre_save.connect(set_news_fields, sender=News,
dispatch_uid="news.models")