sites.append(final_url)
xml = loader.render_to_string('sitemap_index.xml', {'sitemaps': sites})
- return HttpResponse(xml, mimetype='application/xml')
+ return HttpResponse(xml, content_type='application/xml')
def sitemap_section_index(request, section, sitemaps):
try:
locations.append(location)
xml = loader.render_to_string('sitemap_section_index.xml', { 'locations' : locations, })
- return HttpResponse(xml, mimetype='application/xml')
+ return HttpResponse(xml, content_type='application/xml')
def sitemap(request, sitemaps, section=None, page=1):
maps, urls = [], []
except PageNotAnInteger:
raise Http404("No page '%s'" % page)
xml = smart_str(loader.render_to_string('sitemap.xml', {'urlset': urls}))
- return HttpResponse(xml, mimetype='application/xml')
+ return HttpResponse(xml, content_type='application/xml')
class OsqaSitemap(Sitemap):
limit = QUESTIONS_SITEMAP_LIMIT