diff --git a/CHANGELOG.md b/CHANGELOG.md index 52ca3238..ec10c697 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,10 @@ Using the following categories, list your changes in this order: ## [Unreleased] +### Added + +- The built-in `idom` client will now automatically configure itself to debug mode depending on `settings.py:DEBUG` + ### Changed - The `component` template tag now supports both positional and keyword arguments. diff --git a/src/django_idom/config.py b/src/django_idom/config.py index 1d7b3075..7931f12d 100644 --- a/src/django_idom/config.py +++ b/src/django_idom/config.py @@ -4,12 +4,14 @@ from django.conf import settings from django.core.cache import DEFAULT_CACHE_ALIAS, BaseCache, caches +from idom.config import IDOM_DEBUG_MODE from idom.core.types import ComponentConstructor from django_idom.defaults import _DEFAULT_QUERY_POSTPROCESSOR from django_idom.types import Postprocessor, ViewComponentIframe +IDOM_DEBUG_MODE.set_current(getattr(settings, "DEBUG")) IDOM_REGISTERED_COMPONENTS: Dict[str, ComponentConstructor] = {} IDOM_VIEW_COMPONENT_IFRAMES: Dict[str, ViewComponentIframe] = {} IDOM_WEBSOCKET_URL = getattr(