feat: integrate python-decouple for environment-based configuration

Replace hardcoded SECRET_KEY, DEBUG, ALLOWED_HOSTS, SITE_NAME, COPYRIGHT_TEXT
with decouple.config() calls; add CSRF_TRUSTED_ORIGINS support via .env.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 17:03:59 +08:00
parent 8b57a7b66a
commit 528225300a
3 changed files with 12 additions and 8 deletions

View File

@@ -13,8 +13,8 @@ EMAIL_HOST_USER=
EMAIL_HOST_PASSWORD=
# Security Settings (for production)
# ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com
# CSRF_TRUSTED_ORIGINS=https://yourdomain.com,https://www.yourdomain.com
ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com
CSRF_TRUSTED_ORIGINS=https://yourdomain.com,https://www.yourdomain.com
# File Upload Settings
FILE_UPLOAD_MAX_MEMORY_SIZE=5242880