Files
project-managment/config/settings/development.py
T
sankalp 89adfe89c5 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.
2026-06-28 14:15:22 +05:45

67 lines
3.1 KiB
Python

"""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"
DEBUG = True
ALLOWED_HOSTS = ["*"]
# ── Database (SQLite) ─────────────────────────────────────────────────────────
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
"OPTIONS": {
"transaction_mode": "IMMEDIATE",
"timeout": 5, # seconds
"init_command": """
PRAGMA journal_mode=WAL;
PRAGMA synchronous=NORMAL;
PRAGMA mmap_size = 134217728;
PRAGMA journal_size_limit = 27103364;
PRAGMA cache_size=2000;
""",
},
}
}
# ── 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 ──────────────────────────────────────────────────────────────────────
CORS_ALLOW_ALL_ORIGINS = True
CORS_ALLOW_CREDENTIALS = True
# ── 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/"
)