Skip to content
This repository has been archived by the owner on Dec 29, 2020. It is now read-only.

palewire/django-sitemaps-index-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A demonstration app that shows a problem I've encountered with django.contrib.sitemaps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages