summaryrefslogtreecommitdiffstats
path: root/forum/sitemap.py
blob: dc97a009cb18f952eb8520cd6043e0e247da6320 (plain)
1
2
3
4
5
6
7
8
9
10
11
from django.contrib.sitemaps import Sitemap
from forum.models import Question

class QuestionsSitemap(Sitemap):
    changefreq = 'daily'
    priority = 0.5
    def items(self):
        return Question.objects.exclude(deleted=True)

    def lastmod(self, obj):
        return obj.last_activity_at