Add whitenoise.
Some checks reported errors
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build encountered an error

This commit is contained in:
Víðir Valberg Guðmundsson 2021-03-01 20:34:51 +01:00
parent cceaf25c6b
commit 72c4020d96
3 changed files with 22 additions and 5 deletions

25
poetry.lock generated
View file

@ -248,11 +248,11 @@ python-versions = ">=3.6"
[[package]]
name = "identify"
version = "1.6.1"
version = "2.0.0"
description = "File identification library for Python"
category = "dev"
optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7"
python-versions = ">=3.6.1"
[package.extras]
license = ["editdistance"]
@ -596,10 +596,21 @@ category = "dev"
optional = false
python-versions = "*"
[[package]]
name = "whitenoise"
version = "5.2.0"
description = "Radically simplified static file serving for WSGI applications"
category = "main"
optional = false
python-versions = ">=3.5, <4"
[package.extras]
brotli = ["brotli"]
[metadata]
lock-version = "1.1"
python-versions = "^3.9"
content-hash = "674f0367589d624ac48e1d8d61639dff1ddad4ee0e5e90de796897dabe9fc976"
content-hash = "273466dbd53a484027b72a712aba600936507cd2d528c9a245464637c0c54207"
[metadata.files]
appdirs = [
@ -739,8 +750,8 @@ h11 = [
{file = "h11-0.12.0.tar.gz", hash = "sha256:47222cb6067e4a307d535814917cd98fd0a57b6788ce715755fa2b6c28b56042"},
]
identify = [
{file = "identify-1.6.1-py2.py3-none-any.whl", hash = "sha256:ec4698722b9a8a6f2aa5f9ff9cc687956494f0ba734941659ad7f018cf457e44"},
{file = "identify-1.6.1.tar.gz", hash = "sha256:7b435803dc79a0f0ce887887a62ad360f3a9e8162ac0db9ee649d5d24085bf30"},
{file = "identify-2.0.0-py2.py3-none-any.whl", hash = "sha256:9cdd81e5d2b6e76c3006d5226316dd947bd6324fbeebb881bec489202fa09d3a"},
{file = "identify-2.0.0.tar.gz", hash = "sha256:b99aa309329c4fea679463eb35d169f3fbe13e66e9dd6162ad1856cbeb03dcbd"},
]
idna = [
{file = "idna-2.10-py2.py3-none-any.whl", hash = "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0"},
@ -891,3 +902,7 @@ wcwidth = [
{file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"},
{file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"},
]
whitenoise = [
{file = "whitenoise-5.2.0-py2.py3-none-any.whl", hash = "sha256:05d00198c777028d72d8b0bbd234db605ef6d60e9410125124002518a48e515d"},
{file = "whitenoise-5.2.0.tar.gz", hash = "sha256:05ce0be39ad85740a78750c86a93485c40f08ad8c62a6006de0233765996e5c7"},
]

View file

@ -12,6 +12,7 @@ django-allauth = "^0.44.0"
psycopg2 = "^2.8.6"
environs = {extras = ["django"], version = "^9.3.1"}
uvicorn = "^0.13.4"
whitenoise = "^5.2.0"
[tool.poetry.dev-dependencies]
pre-commit = "^2.9.3"

View file

@ -40,6 +40,7 @@ DATABASES = {"default": env.dj_db_url("DATABASE_URL")}
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",