diff --git a/django/contrib/sitemaps/templates/sitemap.xml b/django/contrib/sitemaps/templates/sitemap.xml index 30ca3c024e..b13b830b9c 100644 --- a/django/contrib/sitemaps/templates/sitemap.xml +++ b/django/contrib/sitemaps/templates/sitemap.xml @@ -1,5 +1,5 @@ - + {% spaceless %} {% for url in urlset %} diff --git a/tests/sitemaps_tests/test_generic.py b/tests/sitemaps_tests/test_generic.py index 141e2e2a39..0efdf4e61d 100644 --- a/tests/sitemaps_tests/test_generic.py +++ b/tests/sitemaps_tests/test_generic.py @@ -40,7 +40,7 @@ class GenericViewsSitemapTests(SitemapTestsBase): for pk in TestModel.objects.values_list("id", flat=True): expected += "%s/testmodel/%s/" % (self.base_url, pk) expected_content = """ - + %s """ % expected @@ -51,7 +51,7 @@ class GenericViewsSitemapTests(SitemapTestsBase): TestModel.objects.update(lastmod=datetime(2013, 3, 13, 10, 0, 0)) response = self.client.get('/generic-lastmod/sitemap.xml') expected_content = """ - + %s/testmodel/%s/2013-03-13 """ % (self.base_url, test_model.pk) diff --git a/tests/sitemaps_tests/test_http.py b/tests/sitemaps_tests/test_http.py index 67fc264e04..3d4e1d84dc 100644 --- a/tests/sitemaps_tests/test_http.py +++ b/tests/sitemaps_tests/test_http.py @@ -67,7 +67,7 @@ class HTTPSitemapTests(SitemapTestsBase): "A simple sitemap section can be rendered" response = self.client.get('/simple/sitemap-simple.xml') expected_content = """ - + %s/location/%snever0.5 """ % (self.base_url, date.today()) @@ -92,7 +92,7 @@ class HTTPSitemapTests(SitemapTestsBase): "A simple sitemap can be rendered" response = self.client.get('/simple/sitemap.xml') expected_content = """ - + %s/location/%snever0.5 """ % (self.base_url, date.today()) @@ -191,7 +191,7 @@ class HTTPSitemapTests(SitemapTestsBase): # doesn't raise an exception. response = self.client.get('/simple/sitemap.xml') expected_content = """ - + http://testserver/location/%snever0.5 """ % date.today() @@ -257,7 +257,7 @@ class HTTPSitemapTests(SitemapTestsBase): "A simple i18n sitemap index can be rendered" response = self.client.get('/simple/i18n.xml') expected_content = """ - + {0}/en/i18n/testmodel/{1}/never0.5{0}/pt/i18n/testmodel/{1}/never0.5 """.format(self.base_url, self.i18n_model.pk) @@ -266,7 +266,7 @@ class HTTPSitemapTests(SitemapTestsBase): def test_sitemap_without_entries(self): response = self.client.get('/sitemap-without-entries/sitemap.xml') expected_content = """ - + """ self.assertXMLEqual(response.content.decode(), expected_content) diff --git a/tests/sitemaps_tests/test_https.py b/tests/sitemaps_tests/test_https.py index c0e21a6258..5c3f8894f8 100644 --- a/tests/sitemaps_tests/test_https.py +++ b/tests/sitemaps_tests/test_https.py @@ -23,7 +23,7 @@ class HTTPSSitemapTests(SitemapTestsBase): "A secure sitemap section can be rendered" response = self.client.get('/secure/sitemap-simple.xml') expected_content = """ - + %s/location/%snever0.5 """ % (self.base_url, date.today()) @@ -48,7 +48,7 @@ class HTTPSDetectionSitemapTests(SitemapTestsBase): "A sitemap section requested in HTTPS is rendered with HTTPS links" response = self.client.get('/simple/sitemap-simple.xml', **self.extra) expected_content = """ - + %s/location/%snever0.5 """ % (self.base_url.replace('http://', 'https://'), date.today())