mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #32648 -- Fixed VariableDoesNotExist rendering sitemaps template.
This commit is contained in:
committed by
Carlton Gibson
parent
23fa29f6a6
commit
08c60cce3b
@@ -255,9 +255,11 @@ class HTTPSitemapTests(SitemapTestsBase):
|
||||
@override_settings(LANGUAGES=(('en', 'English'), ('pt', 'Portuguese')))
|
||||
def test_simple_i18n_sitemap_index(self):
|
||||
"""
|
||||
A simple i18n sitemap index can be rendered.
|
||||
A simple i18n sitemap index can be rendered, without logging variable
|
||||
lookup errors.
|
||||
"""
|
||||
response = self.client.get('/simple/i18n.xml')
|
||||
with self.assertNoLogs('django.template', 'DEBUG'):
|
||||
response = self.client.get('/simple/i18n.xml')
|
||||
expected_content = """<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
<url><loc>{0}/en/i18n/testmodel/{1}/</loc><changefreq>never</changefreq><priority>0.5</priority></url><url><loc>{0}/pt/i18n/testmodel/{1}/</loc><changefreq>never</changefreq><priority>0.5</priority></url>
|
||||
|
||||
Reference in New Issue
Block a user