Files
web_django_template/site/client_site/settings/dev.py
T
westfarnandCursor 787f0e48fb Populate the client website template with catalog feature flags.
Extract always-on public/portal/UTM plus optional email_sms, directmail, blog, payments, social, and social_ai so new client sites can be bootstrapped from this seed.

Refs #1
Refs #2

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 07:55:26 -05:00

39 lines
1.1 KiB
Python

"""Development settings."""
from .base import * # noqa: F403
from .logging import build_logging_config, logging_level_for_env
DEBUG = True
SITE_UNDER_CONSTRUCTION = env_bool("SITE_UNDER_CONSTRUCTION", False) # noqa: F405
TIANJI_ENABLED = env_bool("TIANJI_ENABLED", False) # noqa: F405
STORAGES = {
"default": {
"BACKEND": "django.core.files.storage.memory.InMemoryStorage",
},
"staticfiles": {
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
},
}
EMAIL_BACKEND = env( # noqa: F405
"EMAIL_BACKEND",
"django.core.mail.backends.console.EmailBackend",
)
# ALLOWED_HOSTS default "*" → empty CSRF_TRUSTED_ORIGINS, which breaks browser
# Origin checks on POST. Always trust local runserver origins in dev.
_local_csrf = [
"http://127.0.0.1:8000",
"http://localhost:8000",
"http://0.0.0.0:8000",
"http://127.0.0.1:8001",
"http://localhost:8001",
]
CSRF_TRUSTED_ORIGINS = list(
dict.fromkeys([*_local_csrf, *CSRF_TRUSTED_ORIGINS]) # noqa: F405
)
LOGGING = build_logging_config(logging_level_for_env("dev"), "dev")