fix(backend): changed debug from string to bool

This commit is contained in:
Rushil Umaretiya 2021-01-30 23:43:00 -05:00
parent e4e1a605c8
commit 1dc45c62ee

View File

@ -27,12 +27,12 @@ BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = os.getenv("SECRET_KEY") SECRET_KEY = os.getenv("SECRET_KEY")
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.getenv("DEBUG") DEBUG = os.getenv("DEBUG") == 'True'
if DEBUG: if DEBUG:
ALLOWED_HOSTS = ["*"] ALLOWED_HOSTS = ["*"]
else: else:
ALLOWED_HOSTS = ["reinvest.online"] ALLOWED_HOSTS = ["api.reinvest.space"]
# Application definition # Application definition
@ -155,4 +155,4 @@ USE_TZ = True
STATIC_URL = '/static/' STATIC_URL = '/static/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
MEDIA_URL = '/media/' MEDIA_URL = '/media/'