Minify HTML

This commit is contained in:
Jake Howard 2024-05-04 20:07:59 +01:00
parent 7cbdda9397
commit 0f328aff0a
Signed by: jake
GPG key ID: 57AFB45680EDD477
3 changed files with 4 additions and 1 deletions

View file

@ -28,6 +28,7 @@ django-permissions-policy==4.18.0
django-enforce-host==1.1.0
django-proxy==1.2.2
wagtail-lite-youtube-embed==0.1.0
django-minify-html==1.7.1
# DRF OpenAPI dependencies
uritemplate

View file

@ -38,7 +38,7 @@ class SearchPageTestCase(TestCase):
self.assertEqual(search_input.attrs["name"], "q")
self.assertEqual(search_input.attrs["hx-get"], "results/")
self.assertEqual(search_input.attrs["value"], "")
self.assertEqual(search_input.attrs.get("value", ""), "")
self.assertEqual(len(soup.select(search_input.attrs["hx-target"])), 1)
self.assertEqual(len(soup.select(search_input.attrs["hx-indicator"])), 2)

View file

@ -79,6 +79,7 @@ INSTALLED_APPS = [
"wagtail_2fa",
"django_otp",
"django_otp.plugins.otp_totp",
"django_minify_html",
"health_check",
"health_check.db",
"health_check.cache",
@ -99,6 +100,7 @@ MIDDLEWARE = [
"corsheaders.middleware.CorsMiddleware",
"enforce_host.EnforceHostMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
"django_minify_html.middleware.MinifyHtmlMiddleware",
"django.middleware.common.CommonMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",