core/settings.py

18 lines
597 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-04-17 15:32:23 +00:00
environ.get("DATABASE_URL", "").replace("postgres://", "postgresql://")
or environ.get("DB_URL", "").replace("postgres://", "postgresql://")
2024-10-13 23:05:20 +00:00
or "sqlite:///discoursio-db.sqlite3"
2022-09-03 10:50:14 +00:00
)
2024-04-17 15:32:23 +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 ""
GLITCHTIP_DSN = environ.get("GLITCHTIP_DSN")
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-04-17 15:32:23 +00:00
ADMIN_SECRET = environ.get("AUTH_SECRET") or "nothing"