fix sitemaps
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from django.contrib.sitemaps import Sitemap
|
||||
|
||||
from posts.models import Post
|
||||
|
||||
|
||||
@@ -7,7 +8,7 @@ class PostSitemap(Sitemap):
|
||||
priority = 1
|
||||
|
||||
def items(self):
|
||||
return Post.objects.filter(is_hidden=False)
|
||||
return Post.objects.published()
|
||||
|
||||
def lastmod(self, obj):
|
||||
return obj.date_modified
|
||||
|
||||
Reference in New Issue
Block a user