From ce3f07de5f71d08a283223fc7bcfecce792a3556 Mon Sep 17 00:00:00 2001 From: radex Date: Fri, 18 Aug 2023 13:00:32 +0200 Subject: [PATCH] add whitenoise lib to serve statics in production w/o nginx --- requirements.txt | 1 + spejstore/settings.py | 1 + 2 files changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index 8172ddd..dcb2075 100644 --- a/requirements.txt +++ b/requirements.txt @@ -32,3 +32,4 @@ social-auth-core==4.4.2 sqlparse==0.4.4 terminaltables==3.1.10 urllib3==2.0.3 +whitenoise==6.5.0 diff --git a/spejstore/settings.py b/spejstore/settings.py index 17472a9..334eab2 100644 --- a/spejstore/settings.py +++ b/spejstore/settings.py @@ -61,6 +61,7 @@ INSTALLED_APPS = [ MIDDLEWARE = [ "django.middleware.security.SecurityMiddleware", + "whitenoise.middleware.WhiteNoiseMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.csrf.CsrfViewMiddleware",