﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
16829	sitemap for static views	madisv	Zbigniew Siciarz	"People also use static views which are not FlatPages. So it's a problem creating a sitemap for such urls.
This is not hard to do if you know how so should this code maybe also be in django or might we just document this so people would know how to do this.

Problem explained also:
http://stackoverflow.com/questions/4836188/django-sitemaps-and-normal-views

Solution by Matt Austin:
from django.core.urlresolvers import reverse
from django.contrib.sitemaps import Sitemap



{{{
class ViewSitemap(Sitemap):
    """"""Reverse static views for XML sitemap.""""""
    def items(self):
        # Return list of url names for views to include in sitemap
        return ['homepage', 'news_article_list', 'contact_page']

    def location(self, item):
        return reverse(item)


sitemaps = {'views': ViewSitemap, 'news_articles': ArticleSitemap}
}}}
"	New feature	closed	Documentation	dev	Normal	fixed	views sitemap		Ready for checkin	1	0	0	0	0	0
