File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
1
from pathlib import Path
2
2
3
+ import os
4
+
3
5
from decouple import config
4
6
5
7
15
17
16
18
17
19
INSTALLED_APPS = [
20
+ "whitenoise.runserver_nostatic" ,
18
21
"django.contrib.admin" ,
19
22
"django.contrib.auth" ,
20
23
"django.contrib.contenttypes" ,
70
73
71
74
MIDDLEWARE = [
72
75
"django.middleware.security.SecurityMiddleware" ,
76
+ "whitenoise.middleware.WhiteNoiseMiddleware" ,
73
77
"django.contrib.sessions.middleware.SessionMiddleware" ,
74
78
"django.middleware.common.CommonMiddleware" ,
75
79
"django.middleware.csrf.CsrfViewMiddleware" ,
93
97
USE_TZ = True
94
98
95
99
100
+ STATIC_ROOT = os .path .join (BASE_DIR , 'static' )
101
+ # STATICFILES_DIRS = [BASE_DIR / "staticfiles"]
96
102
STATIC_URL = "/api/static/"
97
- STATICFILES_DIRS = [BASE_DIR / "static" ]
98
- # STATIC_ROOT = BASE_DIR / "static/"
99
103
100
104
MEDIA_URL = "/images/"
101
105
MEDIA_ROOT = BASE_DIR / "images/"
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ python manage.py migrate
5
5
celery -A config.celery worker -l info &
6
6
celery -A config.celery beat -l info &
7
7
8
+ python manage.py collectstatic &
9
+
8
10
python manage.py runserver 0.0.0.0:8000 &
9
11
10
12
sleep 5
Original file line number Diff line number Diff line change @@ -77,4 +77,5 @@ django-celery-beat==2.5.0
77
77
django-celery-results == 2.5.0
78
78
psycopg2-binary == 2.9.6
79
79
# healthcheck
80
- psutil
80
+ psutil
81
+ whitenoise == 6.6.0
You can’t perform that action at this time.
0 commit comments