I have the following url configuration
url(r'^sitemap\.xml$', index, {'sitemaps': sitemaps}),
url(r'^sitemap-(?P<section>.+)\.xml', cache_page(86400)(sitemap), {'sitemaps': sitemaps}),
and sitemaps include following sitemap
class ArticlesDetailSiteMap(Sitemap):
changefreq = "daily"
priority = 0.9
def items(self):
return Article.objects.filter(is_visible=True, date_published__lte=timezone.now())
but there are more than 50.000 articles. So i get timeout error when i try /sitemap-articles.xml
because it tries to get all the articles.
Any ideas how should i create an index and make the pagination work here as it says in the documentation below,
https://docs.djangoproject.com/en/dev/ref/contrib/sitemaps/#creating-a-sitemap-index