summaryrefslogtreecommitdiff
path: root/sitemaps.py
diff options
context:
space:
mode:
Diffstat (limited to 'sitemaps.py')
-rw-r--r--sitemaps.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/sitemaps.py b/sitemaps.py
index 110c588a..b079d8b7 100644
--- a/sitemaps.py
+++ b/sitemaps.py
@@ -7,6 +7,8 @@ from django.core.urlresolvers import reverse
from main.models import Package
from news.models import News
from packages.utils import get_group_info, get_split_packages_info
+from releng.models import Release
+
class PackagesSitemap(Sitemap):
changefreq = "weekly"
@@ -86,6 +88,21 @@ class NewsSitemap(Sitemap):
return 'yearly'
+class ReleasesSitemap(Sitemap):
+ changefreq = "monthly"
+
+ def items(self):
+ return Release.objects.all().defer('info', 'torrent_data').order_by()
+
+ def lastmod(self, obj):
+ return obj.created
+
+ def priority(self, obj):
+ if obj.available:
+ return "0.6"
+ return "0.2"
+
+
class BaseSitemap(Sitemap):
DEFAULT_PRIORITY = 0.7