summaryrefslogtreecommitdiff
path: root/sitemaps.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-11-11 11:57:04 -0600
committerDan McGee <dan@archlinux.org>2011-11-11 11:57:04 -0600
commita883b0af23143364ab0724fda2ecdef9aba8191f (patch)
treef13ceb1a24ee1b9618c6fdc9fb543f6c1a957671 /sitemaps.py
parent022692b3f33de8c45741d3cb27fa95f9f6facdea (diff)
Add a split packages sitemaprelease_2011-11-11
With very low priority, but this should at least give a few more cross-linking pages to any crawlers using sitemaps. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'sitemaps.py')
-rw-r--r--sitemaps.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/sitemaps.py b/sitemaps.py
index 8ac5bc4f..7718002d 100644
--- a/sitemaps.py
+++ b/sitemaps.py
@@ -3,7 +3,7 @@ from django.core.urlresolvers import reverse
from main.models import Package
from news.models import News
-from packages.utils import get_group_info
+from packages.utils import get_group_info, get_split_packages_info
class PackagesSitemap(Sitemap):
changefreq = "weekly"
@@ -41,6 +41,21 @@ class PackageGroupsSitemap(Sitemap):
return '/groups/%s/%s/' % (obj['arch'], obj['name'])
+class SplitPackagesSitemap(Sitemap):
+ changefreq = "weekly"
+ priority = "0.3"
+
+ def items(self):
+ return get_split_packages_info()
+
+ def lastmod(self, obj):
+ return obj['last_update']
+
+ def location(self, obj):
+ return '/packages/%s/%s/%s/' % (
+ obj['repo'].name.lower(), obj['arch'], obj['pkgbase'])
+
+
class NewsSitemap(Sitemap):
changefreq = "never"
priority = "0.8"