feat(config): add generatedconfiguration skeleton
New Features - Add ASGI entry point (`asgi.py`) with environment‑based settings. - Create base and production settings modules (`base.py`, `production.py`) for shared and production‑specific configurations. - Generate root `urls.py` with DRF JWT endpoints and included app URLs. - Provide `wsgi.py` configured for production settings. Enhancements - Include `django-jazzmin`, `drf-spectacular`, and `django-cors-headers` defaults. - Set up `django-tailwind-cli` and `django-htmx` middleware configurations. Bug Fixes - (none)
This commit is contained in:
8 files changed
+383
No files matched your search
@@ -0,0 +1,42 @@
|
||||
"""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
|
||||
"init_command": """
|
||||
PRAGMA journal_mode=WAL;
|
||||
PRAGMA synchronous=NORMAL;
|
||||
PRAGMA mmap_size = 134217728;
|
||||
PRAGMA journal_size_limit = 27103364;
|
||||
PRAGMA cache_size=2000;
|
||||
""",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
# 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
|
||||
Reference in new issue
Block a user