summaryrefslogtreecommitdiffstats
path: root/feeds.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-05-20 13:21:59 -0500
committerDan McGee <dan@archlinux.org>2012-05-20 13:21:59 -0500
commitd685d51e8c80f29d4f14977a0d8088534e6626c4 (patch)
tree3f710fbf51e1a81e0a22c0da07480d09d68b3956 /feeds.py
parenteef1ee7051093b9f6e74ab5669af8c57983872d9 (diff)
downloadarchweb-d685d51e8c80f29d4f14977a0d8088534e6626c4.tar.gz
archweb-d685d51e8c80f29d4f14977a0d8088534e6626c4.zip
Ensure we use last_modified date from News in headers
We were actually using the postdate attribute rather than last_modified, which means any News objects that get edited would not trigger an update of the feed. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'feeds.py')
-rw-r--r--feeds.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/feeds.py b/feeds.py
index ee856f62..2e9b349b 100644
--- a/feeds.py
+++ b/feeds.py
@@ -106,13 +106,13 @@ class PackageFeed(Feed):
def news_etag(request, *args, **kwargs):
- latest = retrieve_latest(News)
+ latest = retrieve_latest(News, 'last_modified')
if latest:
return hashlib.md5(str(latest)).hexdigest()
return None
def news_last_modified(request, *args, **kwargs):
- return retrieve_latest(News)
+ return retrieve_latest(News, 'last_modified')
class NewsFeed(Feed):
feed_type = GuidNotPermalinkFeed