Django Sitemaps Index Bug (Ticket #13908)
This Django project is meant to demonstrate a bug I’ve encountered while using the otherwise wonderful django.contrib.sitemaps.
Here’s the nut: If I try to use the “index” sitemap for more than one app, everything goes haywire and they start overwriting each other.
To see what I mean, download the app and visit the two following urls:
http://localhost:8000/app1/sitemap.xml
http://localhost:8000/app2/sitemap.xml
What you’ll see is that both of the pagination url sets point to the app2 subdirectory.
This seems to be caused by the fact that I’m not calling a single sitemap index from the root urls file, but instead calling two, one from each app’s urlset.
Maybe this is the wrong way to use sitemaps, and I can be ignored, but I think the problem happens in line 17 of django.contrib.sitemaps.views where the url is reversed.
Finally, I had this problem with Django 1.1, though I imagine it still would occur in 1.2 and later.