From a9ca8e388fa5e624461f570e50c3f38a05d64392 Mon Sep 17 00:00:00 2001 From: Jussi Arpalahti Date: Thu, 12 Oct 2023 11:30:09 +0300 Subject: [PATCH 1/2] Add whitenoise for static files --- deviceregistry/settings.py | 1 + requirements.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/deviceregistry/settings.py b/deviceregistry/settings.py index a96bda3..eca1962 100644 --- a/deviceregistry/settings.py +++ b/deviceregistry/settings.py @@ -62,6 +62,7 @@ MIDDLEWARE = [ "django.middleware.security.SecurityMiddleware", + "whitenoise.middleware.WhiteNoiseMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.csrf.CsrfViewMiddleware", diff --git a/requirements.txt b/requirements.txt index 95c286f..e20acfa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -51,3 +51,4 @@ sqlparse==0.4.4 # mittaridatapumppu-deviceregistry (pyproject.toml) unittest-parametrize==1.3.0 # via mittaridatapumppu-deviceregistry (pyproject.toml) +whitenoise<7 From e5e9c93a629d77fe67d39abc4ecafb3ad892cd94 Mon Sep 17 00:00:00 2001 From: "Aapo (f021b) Rista" Date: Mon, 16 Oct 2023 16:57:28 +0300 Subject: [PATCH 2/2] Move whitenoise to pyproject.toml and run `pip-compile -v -U --resolver=backtracking pyproject.toml` --- pyproject.toml | 1 + requirements.txt | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9df9546..bf1b3da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ dependencies = [ "pytest-django", "sqlparse", "unittest-parametrize", + "whitenoise < 7" ] [tool.black] diff --git a/requirements.txt b/requirements.txt index e20acfa..bf22d63 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,7 +27,7 @@ openpyxl==3.1.2 # via mittaridatapumppu-deviceregistry (pyproject.toml) packaging==23.2 # via pytest -pillow==10.0.1 +pillow==10.1.0 # via mittaridatapumppu-deviceregistry (pyproject.toml) pluggy==1.3.0 # via pytest @@ -49,6 +49,7 @@ sqlparse==0.4.4 # via # django # mittaridatapumppu-deviceregistry (pyproject.toml) -unittest-parametrize==1.3.0 +unittest-parametrize==1.4.0 + # via mittaridatapumppu-deviceregistry (pyproject.toml) +whitenoise==6.6.0 # via mittaridatapumppu-deviceregistry (pyproject.toml) -whitenoise<7