From 8414a1ee0848fe82706cda255d5ddc7dd1d2702c Mon Sep 17 00:00:00 2001 From: luxagraf Date: Wed, 2 Feb 2011 17:56:20 -0600 Subject: fixed a bug in the sitemap --- apps/projects/models/base.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/projects/models/base.py b/apps/projects/models/base.py index 96ccd59..df279ad 100644 --- a/apps/projects/models/base.py +++ b/apps/projects/models/base.py @@ -60,4 +60,15 @@ class Project(models.Model): return self.get_previous_by_pub_date(status__exact=1) def get_next_published(self): - return self.get_next_by_pub_date(status__exact=1) \ No newline at end of file + return self.get_next_by_pub_date(status__exact=1) + + +class ProjectSitemap(Sitemap): + changefreq = "never" + priority = 1.0 + + def items(self): + return Project.objects.filter(status=1) + + def lastmod(self, obj): + return obj.pub_date -- cgit v1.2.3-70-g09d2