Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

exclude blogs from sitemap

  • Loading branch information...
commit 98561f5fe9bd153b9042b70c753446d98c00785e 1 parent 828c1ce
@ialbert authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  main/scripts/sitemap.py
View
2  main/scripts/sitemap.py
@@ -14,7 +14,7 @@ def path(*args):
return os.path.abspath(os.path.join(*args))
def generate():
- sitemap = GenericSitemap({'queryset': models.Post.objects.filter(type__in=const.POST_TOPLEVEL), })
+ sitemap = GenericSitemap({'queryset': models.Post.objects.filter(type__in=const.POST_TOPLEVEL).exclude(type=const.POST_BLOG), })
urlset = sitemap.get_urls()
text = loader.render_to_string('sitemap.xml', {'urlset': urlset})
text = smart_str(text)
Please sign in to comment.
Something went wrong with that request. Please try again.