]> git.openstreetmap.org Git - osqa.git/blob - forum/sitemap.py
error in votes left message
[osqa.git] / forum / sitemap.py
1 from django.contrib.sitemaps import Sitemap
2 from forum.models import Question
3
4 class QuestionsSitemap(Sitemap):
5     changefreq = 'daily'
6     priority = 0.5
7     def items(self):
8         return Question.objects.exclude(deleted=True)
9
10     def lastmod(self, obj):
11         return obj.last_activity_at
12
13     def location(self, obj):
14         return obj.get_absolute_url()