summaryrefslogtreecommitdiff
path: root/sitemaps.py
diff options
context:
space:
mode:
Diffstat (limited to 'sitemaps.py')
-rw-r--r--sitemaps.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/sitemaps.py b/sitemaps.py
index eb4e05d9..fb81357e 100644
--- a/sitemaps.py
+++ b/sitemaps.py
@@ -98,6 +98,13 @@ class NewsSitemap(Sitemap):
return 'yearly'
+class RecentNewsSitemap(NewsSitemap):
+ def items(self):
+ now = datetime.utcnow().replace(tzinfo=utc)
+ cutoff = now - timedelta(days=30)
+ return super(RecentNewsSitemap, self).items().filter(postdate__gte=cutoff)
+
+
class ReleasesSitemap(Sitemap):
changefreq = "monthly"