mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-27 13:05:38 +00:00
13 lines
282 B
Python
13 lines
282 B
Python
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 |