feat(config): add email backend and update settings for production
Support email sending via SMTP, configure static/media handling, set correct timezone, enable Swagger UI, and add external access routes.
This commit is contained in:
6 files changed
+643
-170
No files matched your search
@@ -1,16 +1,14 @@
|
||||
"""generated with djinit"""
|
||||
"""Development settings — SQLite, console email, CORS open, debug on."""
|
||||
|
||||
from .base import * # noqa: F401, F403
|
||||
|
||||
# ── Core ──────────────────────────────────────────────────────────────────────
|
||||
|
||||
SECRET_KEY = "u4lMI*X9ArV9+CUWTOdYdh_9FcAx%$VVzlK&Kb(%1WA@C4Dkqi"
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = ["*"]
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/5.2/ref/settings/#databases
|
||||
# ── Database (SQLite) ─────────────────────────────────────────────────────────
|
||||
|
||||
DATABASES = {
|
||||
"default": {
|
||||
@@ -30,13 +28,39 @@ DATABASES = {
|
||||
}
|
||||
}
|
||||
|
||||
# Email backend for development
|
||||
# ── Static Files ──────────────────────────────────────────────────────────────
|
||||
|
||||
STORAGES = {
|
||||
"default": {
|
||||
"BACKEND": "django.core.files.storage.FileSystemStorage",
|
||||
},
|
||||
"staticfiles": {
|
||||
# Use simple storage in dev — no compression/manifest needed
|
||||
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
|
||||
},
|
||||
}
|
||||
|
||||
# ── Tailwind ──────────────────────────────────────────────────────────────────
|
||||
|
||||
TAILWIND_CLI_VERSION = "4.0.0"
|
||||
|
||||
# ── Email ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
|
||||
|
||||
# CORS settings for development
|
||||
# Allow all origins in development (convenient but not secure)
|
||||
# ── CORS ──────────────────────────────────────────────────────────────────────
|
||||
|
||||
CORS_ALLOW_ALL_ORIGINS = True
|
||||
CORS_ALLOW_CREDENTIALS = True
|
||||
|
||||
# Disable HTTPS redirect in development
|
||||
# ── Security ──────────────────────────────────────────────────────────────────
|
||||
|
||||
SECURE_SSL_REDIRECT = False
|
||||
|
||||
# ── Google OAuth ──────────────────────────────────────────────────────────────
|
||||
|
||||
GOOGLE_CLIENT_ID = env("GOOGLE_CLIENT_ID", default="")
|
||||
GOOGLE_CLIENT_SECRET = env("GOOGLE_CLIENT_SECRET", default="")
|
||||
GOOGLE_REDIRECT_URI = env(
|
||||
"GOOGLE_REDIRECT_URI", default="http://localhost:8000/api/auth/google/callback/"
|
||||
)
|
||||
Reference in new issue
Block a user