diff --git a/frontend/.env.development b/frontend/.env.development index b2d8de4..c765184 100644 --- a/frontend/.env.development +++ b/frontend/.env.development @@ -1,2 +1,2 @@ VITE_DEV_MODE=true -VITE_API_URL=http://lvh.me:8000 +VITE_API_URL=http://localhost:8000 diff --git a/smoothschedule/config/settings/base.py b/smoothschedule/config/settings/base.py index 452191e..97192d0 100644 --- a/smoothschedule/config/settings/base.py +++ b/smoothschedule/config/settings/base.py @@ -224,6 +224,21 @@ MANAGERS = ADMINS # Force the `admin` sign in process to go through the `django-allauth` workflow DJANGO_ADMIN_FORCE_ALLAUTH = env.bool("DJANGO_ADMIN_FORCE_ALLAUTH", default=False) +# LOGGING - Base structure (extended by multitenancy.py, overridden by local.py/production.py) +# ------------------------------------------------------------------------------ +# Minimal structure here - actual handlers defined in environment-specific settings +LOGGING = { + "version": 1, + "disable_existing_loggers": False, + "formatters": {}, + "handlers": { + "console": { + "level": "DEBUG", + "class": "logging.StreamHandler", + }, + }, +} + REDIS_URL = env("REDIS_URL", default="redis://redis:6379/0") REDIS_SSL = REDIS_URL.startswith("rediss://") diff --git a/smoothschedule/config/settings/local.py b/smoothschedule/config/settings/local.py index f3116b4..6f1b2db 100644 --- a/smoothschedule/config/settings/local.py +++ b/smoothschedule/config/settings/local.py @@ -114,5 +114,16 @@ INSTALLED_APPS += ["django_extensions"] # https://docs.celeryq.dev/en/stable/userguide/configuration.html#task-eager-propagates CELERY_TASK_EAGER_PROPAGATES = True + +# LOGGING - Development +# ------------------------------------------------------------------------------ +# Extend the base LOGGING configuration with development settings +LOGGING["disable_existing_loggers"] = False +LOGGING["formatters"]["verbose"] = { + "format": "%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s", +} +LOGGING["handlers"]["console"]["formatter"] = "verbose" +LOGGING["root"] = {"level": "DEBUG", "handlers": ["console"]} + # Your stuff... # ------------------------------------------------------------------------------ diff --git a/smoothschedule/config/settings/multitenancy.py b/smoothschedule/config/settings/multitenancy.py index 628c9eb..0f8d7fd 100644 --- a/smoothschedule/config/settings/multitenancy.py +++ b/smoothschedule/config/settings/multitenancy.py @@ -4,7 +4,7 @@ This file extends base.py and adds django-tenants configuration """ from .base import * # noqa -from .base import INSTALLED_APPS, MIDDLEWARE, DATABASES, env +from .base import INSTALLED_APPS, MIDDLEWARE, DATABASES, LOGGING, env # ============================================================================= # MULTI-TENANCY CONFIGURATION (django-tenants)