Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Only show published blog entries in sitemap.

  • Loading branch information...
commit 0ea9363368821489583c5dc44bc11cb1a5b4f273 1 parent ba8fd92
Julien Phalip jphalip authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django_website/sitemaps.py
2  django_website/sitemaps.py
View
@@ -34,7 +34,7 @@ class WeblogSitemap(Sitemap):
priority = 0.4
def items(self):
- return Entry.objects.filter(pub_date__lte=datetime.datetime.now())
+ return Entry.objects.published()
# lastmod is not implemented, because weblog pages contain comments.
# We'd rather not look up the date of the latest comment -- not worth the overhead.
Please sign in to comment.
Something went wrong with that request. Please try again.