From 5f9d98d40740d36ada63f7ff3627b18f91a0fc9c Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 10 Mar 2010 00:17:51 -0600 Subject: Sitemaps: split and index, add package files Split it up as it is growing rather large, and add all the package files views to the mix so Google or anyone can pick those up. They get a slightly lower priority (if that even matters). Signed-off-by: Dan McGee --- sitemaps.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'sitemaps.py') diff --git a/sitemaps.py b/sitemaps.py index 256f7101..25b48c68 100644 --- a/sitemaps.py +++ b/sitemaps.py @@ -3,7 +3,7 @@ class PackagesSitemap(Sitemap): changefreq = "monthly" - priority = "0.4" + priority = "0.5" def items(self): return Package.objects.select_related('arch', 'repo').all() @@ -12,6 +12,17 @@ def items(self): def lastmod(self, obj): return obj.last_update + +class PackageFilesSitemap(PackagesSitemap): + priority = "0.3" + + def location(self, obj): + return PackagesSitemap.location(self, obj) + 'files/' + + def lastmod(self, obj): + return obj.files_last_update + + class NewsSitemap(Sitemap): changefreq = "never" priority = "0.7" -- cgit v1.2.3-54-g00ecf