core/settings.py

18 lines
613 B
Python
Raw Normal View History

2023-12-24 14:25:57 +00:00
import sys
2024-01-25 19:41:27 +00:00
from os import environ
2024-02-21 20:14:06 +00:00
PORT = 8000
2022-09-03 10:50:14 +00:00
DB_URL = (
2024-02-21 16:14:58 +00:00
environ.get('DATABASE_URL', '').replace('postgres://', 'postgresql://')
or environ.get('DB_URL', '').replace('postgres://', 'postgresql://')
or 'postgresql://postgres@localhost:5432/discoursio'
2022-09-03 10:50:14 +00:00
)
2024-02-21 16:14:58 +00:00
REDIS_URL = environ.get('REDIS_URL') or 'redis://127.0.0.1'
API_BASE = environ.get('API_BASE') or ''
AUTH_URL = environ.get('AUTH_URL') or ''
2024-04-09 16:50:27 +00:00
GLITCHTIP_DSN = environ.get('GLITCHTIP_DSN')
2024-02-21 16:14:58 +00:00
DEV_SERVER_PID_FILE_NAME = 'dev-server.pid'
MODE = 'development' if 'dev' in sys.argv else 'production'
2023-12-25 01:45:21 +00:00
2024-02-21 16:14:58 +00:00
ADMIN_SECRET = environ.get('AUTH_SECRET') or 'nothing'