blob: 3b83e4cc40d472c60b8e62d886980435856382f7 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
 | # Refresh the debug toolbar's configuration when overriding settings.
from debug_toolbar.utils.settings import CONFIG, CONFIG_DEFAULTS
from django.dispatch import receiver
from django.test.signals import setting_changed
@receiver(setting_changed)
def update_toolbar_config(**kwargs):
    if kwargs['setting'] == 'DEBUG_TOOLBAR_CONFIG':
        CONFIG.update(CONFIG_DEFAULTS)
        CONFIG.update(kwargs['value'] or {})
 |