Skip to content

Commit

Permalink
Whitenoise it up. I just wanna serve some static files is all...
Browse files Browse the repository at this point in the history
  • Loading branch information
joshSzep committed Jul 22, 2024
1 parent cc94381 commit 4dd72ea
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"Szepietowski",
"venv",
"viewsets",
"whitenoise",
"wsgi",
"yasg"
],
Expand Down
2 changes: 2 additions & 0 deletions hangul_tutor/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@

MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
Expand Down Expand Up @@ -181,6 +182,7 @@

STATIC_URL = "static/"
STATIC_ROOT = BASE_DIR / "static"
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"

# Default primary key field type
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
Expand Down
16 changes: 15 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ celery = "^5.4.0"
redis = "^5.0.7"
django-allauth = { extras = ["socialaccount", "mfa"], version = "^0.63.6" }
psycopg2 = "^2.9.9"
whitenoise = "^6.7.0"

[tool.poetry.group.dev.dependencies]
isort = "^5.13.2"
Expand Down

0 comments on commit 4dd72ea

Please sign in to comment.