本文整理汇总了Python中django.test.signals.setting_changed.connect方法的典型用法代码示例。如果您正苦于以下问题:Python setting_changed.connect方法的具体用法?Python setting_changed.connect怎么用?Python setting_changed.connect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类django.test.signals.setting_changed
的用法示例。
在下文中一共展示了setting_changed.connect方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ready
# 需要导入模块: from django.test.signals import setting_changed [as 别名]
# 或者: from django.test.signals.setting_changed import connect [as 别名]
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()
示例2: __init__
# 需要导入模块: from django.test.signals import setting_changed [as 别名]
# 或者: from django.test.signals.setting_changed import connect [as 别名]
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)