feat(config): streamline configuration and remove dev‑only settingsAdd custom user model and improve static/media handling.

- New Features
  - Introduce `AUTH_USER_MODEL` for a custom user.
  - Add `STATICFILES_DIRS` to explicitly point to the static directory.
  - Simplify email backend configuration using environment variables.

- Enhancements
  - Remove djinit boilerplate and development‑only settings.
  - Drop `corsheaders` middleware and `rest_framework_simplejwt.token_blacklist`.
  - Update `TEMPLATES` to include project templates via `BASE_DIR / "templates"`.
  - Clean up URL patterns, removing deprecated JWT endpoint comments.
  - Reorganize security settings and static storage configuration.

- Bug Fixes
  - (none)
This commit is contained in:
sankalp committed 2026-05-27 23:33:10 +05:45
1 parent 0357d78939
commit 06ea5d2945
4 files changed
+30 -192

No files matched your search

+2 -18
View File
@@ -1,24 +1,16 @@
"""generated with djinit"""
from .base import *
SECRET_KEY = "o$62pY2y3M3&!YtUG*857JA=*svOdaVFf+%veG@XZkmfD0GOm$"
# 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
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
"OPTIONS": {
"transaction_mode": "IMMEDIATE",
"timeout": 5, # seconds
"timeout": 5,
"init_command": """
PRAGMA journal_mode=WAL;
PRAGMA synchronous=NORMAL;
@@ -30,13 +22,5 @@ DATABASES = {
}
}
# Email backend for development
EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend"
# CORS settings for development
# Allow all origins in development (convenient but not secure)
CORS_ALLOW_ALL_ORIGINS = True
CORS_ALLOW_CREDENTIALS = True
# Disable HTTPS redirect in development
SECURE_SSL_REDIRECT = False
SECURE_SSL_REDIRECT = False