]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/sitemap.py
Creating a new Setting Set for the Sitemap settings. Making the Questions Sitemap...
[osqa.git] / forum / sitemap.py
index 4478176b07143b17711fb6b38bd09519ab96abf1..293d5e5054da43181a4c48faf5952723d9b32be9 100644 (file)
@@ -1,5 +1,6 @@
 from django.contrib.sitemaps import Sitemap
 from forum.models import Question
 from django.contrib.sitemaps import Sitemap
 from forum.models import Question
+from forum.settings import QUESTIONS_SITEMAP_LIMIT, QUESTIONS_SITEMAP_CHANGEFREQ
 from django.conf import settings
 from django.http import HttpResponse, Http404
 from django.template import loader
 from django.conf import settings
 from django.http import HttpResponse, Http404
 from django.template import loader
@@ -61,8 +62,8 @@ def sitemap(request, sitemaps, section=None, page=1):
     return HttpResponse(xml, mimetype='application/xml')
 
 class OsqaSitemap(Sitemap):
     return HttpResponse(xml, mimetype='application/xml')
 
 class OsqaSitemap(Sitemap):
-    limit = 2500
-    changefreq = 'daily'
+    limit = QUESTIONS_SITEMAP_LIMIT
+    changefreq = QUESTIONS_SITEMAP_CHANGEFREQ
     priority = 0.5
     def items(self):
         return Question.objects.filter_state(deleted=False).order_by('id')
     priority = 0.5
     def items(self):
         return Question.objects.filter_state(deleted=False).order_by('id')