File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 30
30
ENV /
31
31
env.bak /
32
32
venv.bak /
33
+ app /static_files /
Original file line number Diff line number Diff line change 36
36
"django.contrib.contenttypes" ,
37
37
"django.contrib.sessions" ,
38
38
"django.contrib.messages" ,
39
+ "whitenoise.runserver_nostatic" ,
39
40
"django.contrib.staticfiles" ,
40
41
"users" ,
41
42
"general" ,
49
50
50
51
MIDDLEWARE = [
51
52
"django.middleware.security.SecurityMiddleware" ,
53
+ "whitenoise.middleware.WhiteNoiseMiddleware" ,
52
54
"django.contrib.sessions.middleware.SessionMiddleware" ,
53
55
"django.middleware.common.CommonMiddleware" ,
54
56
"django.middleware.csrf.CsrfViewMiddleware" ,
126
128
# Static files (CSS, JavaScript, Images)
127
129
# https://docs.djangoproject.com/en/5.0/howto/static-files/
128
130
129
- STATIC_URL = "static/"
131
+ STATIC_URL = "/ static/"
130
132
STATICFILES_DIRS = [
131
133
BASE_DIR / "static" ,
132
134
]
133
135
136
+ STATIC_ROOT = BASE_DIR / "static_files"
137
+ STORAGES = {
138
+ "default" : {
139
+ "BACKEND" : "django.core.files.storage.FileSystemStorage" ,
140
+ },
141
+ "staticfiles" : {
142
+ "BACKEND" : "whitenoise.storage.CompressedManifestStaticFilesStorage" ,
143
+ },
144
+ }
145
+
134
146
# Default primary key field type
135
147
# https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field
136
148
Original file line number Diff line number Diff line change 1
1
django == 5.0.2
2
2
psycopg2-binary
3
3
gunicorn
4
+ whitenoise
You can’t perform that action at this time.
0 commit comments