1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-27 16:04:24 +00:00

13 lines
282 B
Python
Raw Normal View History

from django.contrib.sitemaps import Sitemap
from scrapyorg.blog.models import Post
class BlogSitemap(Sitemap):
changefreq = "never"
priority = 0.5
def items(self):
return Post.objects.published()
def lastmod(self, obj):
return obj.publish