Python django.test.signals.setting_changed.connect() Examples

The following are 2 code examples of django.test.signals.setting_changed.connect(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module django.test.signals.setting_changed , or try the search function .
Example #1
Source File: apps.py    From scout_apm_python with MIT License 6 votes vote down vote up
def ready(self):
        self.update_scout_config_from_django_settings()
        setting_changed.connect(self.on_setting_changed)

        # Finish installing the agent. If the agent isn't installed for any
        # reason, return without installing instruments
        installed = scout_apm.core.install()
        if not installed:
            return

        self.install_middleware()

        # Setup Instruments
        ensure_huey_instrumented()
        ensure_sql_instrumented()
        ensure_templates_instrumented() 
Example #2
Source File: conf.py    From dynamic-rest with MIT License 5 votes vote down vote up
def __init__(self, name, defaults, settings, class_attrs=None):
        self.name = name
        self.defaults = defaults
        self.keys = set(defaults.keys())
        self.class_attrs = class_attrs

        self._cache = {}
        self._reload(getattr(settings, self.name, {}))

        setting_changed.connect(self._settings_changed)