You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

65 lines
2.4 KiB

"""
Local development settings — no Docker required.
Uses SQLite instead of PostgreSQL and dummy cache instead of Redis.
Use: set DJANGO_SETTINGS_MODULE=config.settings.local
"""
from .base import * # noqa
# --------------------------------------------------------------------------- #
# Database: SQLite (no PostgreSQL / Docker needed)
# --------------------------------------------------------------------------- #
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
# --------------------------------------------------------------------------- #
# Redis & Cache (local Redis service on port 6379)
# --------------------------------------------------------------------------- #
REDIS_URL = 'redis://127.0.0.1:6379/0'
DJANGO_REDIS_IGNORE_EXCEPTIONS = True
CACHES = {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': REDIS_URL,
'OPTIONS': {
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
'IGNORE_EXCEPTIONS': True,
}
}
}
# --------------------------------------------------------------------------- #
# Celery: run tasks eagerly in-process (no broker needed)
# --------------------------------------------------------------------------- #
CELERY_TASK_ALWAYS_EAGER = True
CELERY_TASK_EAGER_PROPAGATES = True
CELERY_BROKER_URL = 'memory://'
CELERY_RESULT_BACKEND = 'cache+memory://'
# --------------------------------------------------------------------------- #
# Email: print to console
# --------------------------------------------------------------------------- #
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
# --------------------------------------------------------------------------- #
# Debug & CORS
# --------------------------------------------------------------------------- #
DEBUG = True
ALLOWED_HOSTS = ['*']
CORS_ALLOW_ALL_ORIGINS = True
# Centrifugo (dummy values for local dev — endpoints won't publish)
CENTRIFUGO_API_URL = 'http://localhost:8001/api'
CENTRIFUGO_SECRET = 'local-dev-hmac-secret'
CENTRIFUGO_API_KEY = 'local-dev-api-key'
# Resend Email Service
RESEND_API_KEY = env('RESEND_API_KEY', default='re_7rkP5MPK_9gLDwdw1f23hzP3wsv2F6A8e')
RESEND_FROM_EMAIL = env('RESEND_FROM_EMAIL', default='[email protected]')
RESEND_SANDBOX_REDIRECT_TO = env('RESEND_SANDBOX_REDIRECT_TO', default='[email protected]')