From 7ca5948e5951dc03405ff68e071f3cbf206d10ac Mon Sep 17 00:00:00 2001 From: keannu125 Date: Sat, 11 Mar 2023 00:14:04 +0800 Subject: [PATCH] Added whitenoise library --- Pipfile | 1 + Pipfile.lock | 10 +++++++++- ivy/config/settings.py | 1 + requirements.txt | 0 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 requirements.txt diff --git a/Pipfile b/Pipfile index 9eb4ced..9d68821 100644 --- a/Pipfile +++ b/Pipfile @@ -11,6 +11,7 @@ djangorestframework-simplejwt = "*" django-cors-headers = "*" django-simple-history = "*" python-dotenv = "*" +whitenoise = "*" [dev-packages] autopep8 = "*" diff --git a/Pipfile.lock b/Pipfile.lock index 091fba6..f491f6b 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "adf075ae1c44614e471a3fde436359004437d32d0736e88bc3cfc79f626de919" + "sha256": "872795782164fb72a8e9c0a8fb9340dad5b71eb7ff9de455e199e50552c74b12" }, "pipfile-spec": 6, "requires": { @@ -483,6 +483,14 @@ ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", "version": "==1.26.14" + }, + "whitenoise": { + "hashes": [ + "sha256:599dc6ca57e48929dfeffb2e8e187879bfe2aed0d49ca419577005b7f2cc930b", + "sha256:a02d6660ad161ff17e3042653c8e3f5ecbb2a2481a006bde125b9efb9a30113a" + ], + "index": "pypi", + "version": "==6.4.0" } }, "develop": { diff --git a/ivy/config/settings.py b/ivy/config/settings.py index ae62a81..bb13db1 100644 --- a/ivy/config/settings.py +++ b/ivy/config/settings.py @@ -50,6 +50,7 @@ INSTALLED_APPS = [ MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', + "whitenoise.middleware.WhiteNoiseMiddleware", 'django.contrib.sessions.middleware.SessionMiddleware', "corsheaders.middleware.CorsMiddleware", 'django.middleware.common.CommonMiddleware', diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29