Update queries for favicon and add cache

It shouldn't change much, so let's cache it
This commit is contained in:
Jake Howard 2022-08-28 00:13:19 +01:00
parent 4b1d873bf8
commit 4ca2a97b2a
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 6 additions and 4 deletions

View file

@ -17,7 +17,9 @@
<meta name="robots" content="noindex" />
{% endif %}
{% cache 3600 "favicon" %}
{% favicon_meta %}
{% endcache %}
{% block extra_head %}{% endblock %}

View file

@ -35,7 +35,7 @@ class ContentPageTestCase(TestCase):
self.assertEqual(response.status_code, 200)
def test_queries(self) -> None:
with self.assertNumQueries(21):
with self.assertNumQueries(25):
self.client.get(self.page.url)
@ -52,7 +52,7 @@ class ListingPageTestCase(TestCase):
ContentPageFactory(parent=cls.page)
def test_accessible(self) -> None:
with self.assertNumQueries(25):
with self.assertNumQueries(29):
response = self.client.get(self.page.url)
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.context["listing_pages"]), 2)

View file

@ -16,7 +16,7 @@ class Error404PageTestCase(TestCase):
)
def test_queries(self) -> None:
with self.assertNumQueries(12):
with self.assertNumQueries(16):
self.client.get(self.url)