]> git.openstreetmap.org Git - osqa.git/blob - forum/sitemap.py
Edited answers were not making the post jump.
[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()