Skip to content

Commit e9a1364

Browse files
committed
1 parent 3011e75 commit e9a1364

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ Using the following categories, list your changes in this order:
2222

2323
## [Unreleased]
2424

25+
### Added
26+
27+
- The built-in `idom` client will now automatically configure itself to debug mode depending on `settings.py:DEBUG`
28+
2529
### Changed
2630

2731
- The `component` template tag now supports both positional and keyword arguments.

src/django_idom/config.py

+2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44

55
from django.conf import settings
66
from django.core.cache import DEFAULT_CACHE_ALIAS, BaseCache, caches
7+
from idom.config import IDOM_DEBUG_MODE
78
from idom.core.types import ComponentConstructor
89

910
from django_idom.defaults import _DEFAULT_QUERY_POSTPROCESSOR
1011
from django_idom.types import Postprocessor, ViewComponentIframe
1112

1213

14+
IDOM_DEBUG_MODE.set_current(getattr(settings, "DEBUG"))
1315
IDOM_REGISTERED_COMPONENTS: Dict[str, ComponentConstructor] = {}
1416
IDOM_VIEW_COMPONENT_IFRAMES: Dict[str, ViewComponentIframe] = {}
1517
IDOM_WEBSOCKET_URL = getattr(

0 commit comments

Comments
 (0)