@@ -26,8 +26,7 @@ def rel(*path):
26
26
# SECURITY WARNING: don't run with debug turned on in production!
27
27
DEBUG = config ("DEBUG" , default = True , cast = bool )
28
28
29
- ALLOWED_HOSTS = config ("ALLOWED_HOSTS" , cast = Csv ())
30
-
29
+ ALLOWED_HOSTS = config ("ALLOWED_HOSTS" , default = [], cast = Csv ())
31
30
32
31
# Application definition
33
32
@@ -102,12 +101,12 @@ def rel(*path):
102
101
103
102
DATABASES = {
104
103
"default" : {
105
- "ENGINE" : config ("DB_ENGINE" ),
106
- "NAME" : config ("DB_NAME" ),
107
- "USER" : config ("DB_USERNAME" ),
108
- "PASSWORD" : config ("DB_PASSWORD" ),
109
- "HOST" : config ("DB_HOSTNAME" ),
110
- "PORT" : config ("DB_PORT" , cast = int ),
104
+ "ENGINE" : config ("DB_ENGINE" , default = "django.db.backends.postgresql" ),
105
+ "NAME" : config ("DB_NAME" , default = "forum" ),
106
+ "USER" : config ("DB_USERNAME" , default = "forum" ),
107
+ "PASSWORD" : config ("DB_PASSWORD" , default = "forum" ),
108
+ "HOST" : config ("DB_HOSTNAME" , default = "127.0.0.1" ),
109
+ "PORT" : config ("DB_PORT" , default = 5432 , cast = int ),
111
110
}
112
111
}
113
112
@@ -192,7 +191,7 @@ def rel(*path):
192
191
193
192
SITE_ID = 1
194
193
195
- CSRF_TRUSTED_ORIGINS = config ("CSRF_TRUSTED_ORIGINS" , cast = Csv ())
194
+ CSRF_TRUSTED_ORIGINS = config ("CSRF_TRUSTED_ORIGINS" , default = [], cast = Csv ())
196
195
197
196
# Email
198
197
EMAIL_BACKEND = config ("DJANGO_EMAIL_BACKEND" , default = "django.core.mail.backends.console.EmailBackend" )
@@ -237,8 +236,8 @@ def rel(*path):
237
236
# -------------------------------------------------------------------------------
238
237
# simple-jwt - https://django-rest-framework-simplejwt.readthedocs.io/en/latest/settings.html
239
238
SIMPLE_JWT = {
240
- "ACCESS_TOKEN_LIFETIME" : timedelta (minutes = config ("ACCESS_TOKEN_LIFETIME" , cast = int )),
241
- "REFRESH_TOKEN_LIFETIME" : timedelta (days = config ("REFRESH_TOKEN_LIFETIME" , cast = int )),
239
+ "ACCESS_TOKEN_LIFETIME" : timedelta (minutes = config ("ACCESS_TOKEN_LIFETIME" , default = 30 , cast = int )),
240
+ "REFRESH_TOKEN_LIFETIME" : timedelta (days = config ("REFRESH_TOKEN_LIFETIME" , default = 15 , cast = int )),
242
241
}
243
242
244
243
# drf-spectacular
0 commit comments