use django whitenoise for static files

This commit is contained in:
2025-11-24 08:28:09 -06:00
parent b02efb06dd
commit 56b325ca10
5 changed files with 10 additions and 1 deletions

View File

@@ -54,6 +54,7 @@ INSTALLED_APPS = [
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
@@ -165,6 +166,9 @@ BOOTSTRAP3 = {
'javascript_in_head': True,
}
# whitenoise
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
###############
# web options #
###############