from .base import *
import os

DEBUG = True
SECRET_KEY = env('DJANGO_SECRET_KEY', default='django-insecure-local-key')
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1"]

# Database - use SQLite for local development (no Docker needed)
# Override with DATABASE_URL env var if you want to use PostgreSQL
DATABASES = {
    'default': env.db('DATABASE_URL', default='sqlite:///' + str(BASE_DIR / 'db.sqlite3'))
}

CORS_ALLOWED_ORIGIN_REGEXES = [
    r"^http://localhost:\d+$",
    r"^http://127\.0\.0\.1:\d+$",
]
CORS_ALLOW_CREDENTIALS = True

# Email - use console backend for local development
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
