stephenmcd/mezzanine — pull request #301 by eht16 (2012-07-07 12:16:49+00:00)
Title: Sitemap: Ensure urls are only added once to the list of items

I noticed it might happen that pages are listed multiple times in /sitemap.xml since for instance a RichTextPage is also a Page and both are subclasses of Displayable.

This solution is probably somewhat slower than the previous easy listing as it needs to iterate over each single item and then retrieve each item's get_absolute_url(). However, I didn't find an easier way of distinguishing unique pages (the slug attribute would be nice but it doesn't contain the PAGES/BLOG slug and so it is not unique across a site).