feat: scaffold Django multi-tenant project with 5 of 9 apps
Phase 1 scaffolding: config/, core/, base models, AES-256-GCM phone encryption, enums mirror apps.tenant: Tenant + Domain (django-tenants) apps.org: 11 models (OrgUnit hierarchy, Staff, audit logs) apps.account: 4 models (UserAccount as AUTH_USER_MODEL, login/password tracking) apps.permission: 7 models (RBAC + overrides + datascope + append-only changelog) apps.region: 5 models (District, BusinessArea, MetroLine, MetroStation, School) All migrations generated, manage.py check passes
This commit is contained in:
27
config/settings/production.py
Normal file
27
config/settings/production.py
Normal file
@@ -0,0 +1,27 @@
|
||||
import sentry_sdk
|
||||
from sentry_sdk.integrations.celery import CeleryIntegration
|
||||
from sentry_sdk.integrations.django import DjangoIntegration
|
||||
|
||||
from .base import * # noqa: F401,F403
|
||||
from .base import env
|
||||
|
||||
DEBUG = False
|
||||
|
||||
SECURE_SSL_REDIRECT = True
|
||||
SESSION_COOKIE_SECURE = True
|
||||
CSRF_COOKIE_SECURE = True
|
||||
SECURE_HSTS_SECONDS = 31536000
|
||||
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
|
||||
SECURE_HSTS_PRELOAD = True
|
||||
SECURE_CONTENT_TYPE_NOSNIFF = True
|
||||
SECURE_REFERRER_POLICY = "same-origin"
|
||||
|
||||
_sentry_dsn = env("SENTRY_DSN", default="")
|
||||
if _sentry_dsn:
|
||||
sentry_sdk.init(
|
||||
dsn=_sentry_dsn,
|
||||
integrations=[DjangoIntegration(), CeleryIntegration()],
|
||||
traces_sample_rate=0.1,
|
||||
send_default_pii=False,
|
||||
environment=env("SENTRY_ENV", default="production"),
|
||||
)
|
||||
Reference in New Issue
Block a user