acknowledge question asked
[prawokultury.git] / questions / sitemap.py
1 from django.contrib.sitemaps import Sitemap
2 from .models import Question
3
4 class QuestionSitemap(Sitemap):
5     changefreq = "never"
6     priority = 0.5
7
8     def items(self):
9         return Question.objects.filter(published=True)
10
11     def lastmod(self, obj):
12         return obj.changed_at
13
14     def location(self, obj):
15         return obj.get_absolute_url()
16
17
18 sitemaps = {
19     "question": QuestionSitemap,
20 }