Files
college_craft/site/client_site/settings/prod.py
T
ai_ml_operations 3a14bfb996 Initial commit
2026-08-27 04:17:34 -07:00

32 lines
919 B
Python

"""Production settings."""
from .base import * # noqa: F403
from .logging import build_logging_config, logging_level_for_env
DEBUG = False
TIANJI_ENABLED = env_bool("TIANJI_ENABLED", True) # noqa: F405
if not env("DJANGO_SECRET_KEY"): # noqa: F405
raise ValueError("DJANGO_SECRET_KEY must be set in production.")
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
USE_X_FORWARDED_HOST = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
# Prod holds visitors on under-construction until launch (set false when ready).
if env("SITE_UNDER_CONSTRUCTION") is None: # noqa: F405
SITE_UNDER_CONSTRUCTION = True # noqa: F405
DATABASE_ROUTERS = ["dj_queue.routers.DjQueueRouter"]
TASKS = {
"default": {
"BACKEND": "dj_queue.backend.DjQueueBackend",
"QUEUES": [],
"OPTIONS": {},
},
}
LOGGING = build_logging_config(logging_level_for_env("prod"), "prod")