Update queries for favicon and add cache
It shouldn't change much, so let's cache it
This commit is contained in:
parent
4b1d873bf8
commit
4ca2a97b2a
3 changed files with 6 additions and 4 deletions
|
@ -17,7 +17,9 @@
|
||||||
<meta name="robots" content="noindex" />
|
<meta name="robots" content="noindex" />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% cache 3600 "favicon" %}
|
||||||
{% favicon_meta %}
|
{% favicon_meta %}
|
||||||
|
{% endcache %}
|
||||||
|
|
||||||
{% block extra_head %}{% endblock %}
|
{% block extra_head %}{% endblock %}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ class ContentPageTestCase(TestCase):
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
|
|
||||||
def test_queries(self) -> None:
|
def test_queries(self) -> None:
|
||||||
with self.assertNumQueries(21):
|
with self.assertNumQueries(25):
|
||||||
self.client.get(self.page.url)
|
self.client.get(self.page.url)
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ class ListingPageTestCase(TestCase):
|
||||||
ContentPageFactory(parent=cls.page)
|
ContentPageFactory(parent=cls.page)
|
||||||
|
|
||||||
def test_accessible(self) -> None:
|
def test_accessible(self) -> None:
|
||||||
with self.assertNumQueries(25):
|
with self.assertNumQueries(29):
|
||||||
response = self.client.get(self.page.url)
|
response = self.client.get(self.page.url)
|
||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertEqual(len(response.context["listing_pages"]), 2)
|
self.assertEqual(len(response.context["listing_pages"]), 2)
|
||||||
|
|
|
@ -16,7 +16,7 @@ class Error404PageTestCase(TestCase):
|
||||||
)
|
)
|
||||||
|
|
||||||
def test_queries(self) -> None:
|
def test_queries(self) -> None:
|
||||||
with self.assertNumQueries(12):
|
with self.assertNumQueries(16):
|
||||||
self.client.get(self.url)
|
self.client.get(self.url)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue