Complete rewrite by OpenCode

This commit is contained in:
2025-11-04 16:42:39 +01:00
parent af636fe6ea
commit 27d11fccd3
22 changed files with 850 additions and 100 deletions

View File

@@ -0,0 +1,62 @@
"""
Development settings for VorgabenUI project.
"""
from .base import *
import os
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.environ.get('SECRET_KEY', 'django-insecure-dev-key-change-in-production')
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = bool(os.environ.get('DEBUG', default='True').lower() == 'true')
ALLOWED_HOSTS = os.environ.get('DJANGO_ALLOWED_HOSTS', 'localhost,127.0.0.1').split(',')
# Database
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'data/db.sqlite3',
}
}
# Static files
STATIC_ROOT = BASE_DIR / 'staticfiles'
# CSRF settings
CSRF_TRUSTED_ORIGINS = os.environ.get('CSRF_TRUSTED_ORIGINS', '').split(',') if os.environ.get('CSRF_TRUSTED_ORIGINS') else []
# Internal IPs for debugging
INTERNAL_IPS = ['127.0.0.1']
# Logging
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'console': {
'class': 'logging.StreamHandler',
},
'file': {
'class': 'logging.FileHandler',
'filename': BASE_DIR / 'django.log',
'level': 'DEBUG',
},
},
'root': {
'handlers': ['console'],
'level': 'INFO',
},
'loggers': {
'django': {
'handlers': ['console', 'file'],
'level': 'INFO',
'propagate': False,
},
'dokumente': {
'handlers': ['console', 'file'],
'level': 'DEBUG',
'propagate': False,
},
},
}