Created
March 23, 2013 13:07
-
-
Save rturowicz/5227675 to your computer and use it in GitHub Desktop.
django - sitemap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# urls.py | |
from django.contrib.sitemaps import FlatPageSitemap, GenericSitemap | |
info_dict = { | |
'queryset': Entry.objects.all(), | |
'date_field': 'pub_date', | |
} | |
sitemaps = { | |
'flatpages': FlatPageSitemap, | |
'blog': GenericSitemap(info_dict, priority=0.6), | |
} | |
urlpatterns = patterns('', | |
url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}), | |
... | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment