Skip to content

Commit c3839e9

Browse files
committed
updated support for Waitress hosting
1 parent e2f61fa commit c3839e9

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

IOLGenv2_BackEnd/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
# Application definition
3838

3939
INSTALLED_APPS = [
40+
'whitenoise.runserver_nostatic',
4041
'jazzmin',
4142
'django.contrib.admin',
4243
'django.contrib.auth',
@@ -58,6 +59,7 @@
5859
]
5960

6061
MIDDLEWARE = [
62+
'whitenoise.middleware.WhiteNoiseMiddleware',
6163
'django.middleware.security.SecurityMiddleware',
6264
'django.contrib.sessions.middleware.SessionMiddleware',
6365
"corsheaders.middleware.CorsMiddleware",
@@ -195,7 +197,7 @@
195197
# STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
196198

197199

198-
STATIC_URL = 'static/'
200+
STATIC_URL = '/static/'
199201

200202
# STATIC_ROOT is for `collectstatic` and should be separate from STATICFILES_DIRS
201203
STATIC_ROOT = BASE_DIR / "staticfiles" # Change this to a different directory

requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ dj_database_url
88
# psycopg2==2.9.10
99
psycopg2-binary==2.9.10
1010
django-jazzmin
11-
# whitenoise==6.8.2
1211
django-import-export
1312
django-debug-toolbar
1413
apscheduler
1514
requests
1615
django-redis
1716
pandas
18-
django-widget-tweaks
17+
django-widget-tweaks
18+
whitenoise
19+
waitress

0 commit comments

Comments
 (0)