blob: c0c60b5eaef33294cabb1e6954b76f0aed398dd2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
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
def location(self, obj):
return obj.get_absolute_url()
|