~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wiki/sitemap.py

  • Committer: kaputtnik
  • Date: 2019-05-30 18:20:02 UTC
  • mto: This revision was merged to the branch mainline in revision 540.
  • Revision ID: kaputtnik-20190530182002-g7l91m1xo28clghv
adjusted README; first commit on the new server

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from django.contrib.sitemaps import Sitemap
 
2
from wiki.models import Article
 
3
 
 
4
 
 
5
class WikiSitemap(Sitemap):
 
6
    changefreq = 'yearly'
 
7
    priority = 0.5
 
8
 
 
9
    def items(self):
 
10
        return Article.objects.all()
 
11
 
 
12
    def lastmod(self, obj):
 
13
        return obj.last_update