~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to news/sitemap.py

  • Committer: Holger Rapp
  • Date: 2009-02-21 18:24:02 UTC
  • Revision ID: sirver@kallisto.local-20090221182402-k3tuf5c4gjwslbjf
Main Page contains now the same informations as before

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from django.contrib.sitemaps import Sitemap
 
2
from widelands.news.models import Post
 
3
 
 
4
 
 
5
class NewsSitemap(Sitemap):
 
6
    changefreq = "never"
 
7
    priority = 0.5
 
8
 
 
9
    def items(self):
 
10
        return Post.objects.published()
 
11
 
 
12
        def lastmod(self, obj):
 
13
            return obj.publish