- New Features - Insert manifest_path and static_url_prefix into base settings for Vite output - Enable/disable dev mode via DJANGO_VITE["default"]["dev_mode"] in development and production templates - Add django‑vite dependency conditionally when use_vite is set in pyproject.toml and requirements - Create new vite.config.ts template with React, Tailwind, dev server proxy, and asset resolution - Enhancements - Align Tailwind and Django settings to respect Vite mode - Update dependency templates to reflect Vite usage - Bug Fixes - (none)
48 lines
1.2 KiB
Plaintext
48 lines
1.2 KiB
Plaintext
"""generated with djinit"""
|
|
|
|
from .base import *
|
|
|
|
SECRET_KEY = "[[ secret_key ]]"
|
|
|
|
# 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
|
|
|
|
# @IF use_vite
|
|
# Vite Settings
|
|
DJANGO_VITE["default"]["dev_mode"] = True
|
|
# @ENDIF
|