(key: str, setting_config: Optional[Tuple] = None)
| 40 | |
| 41 | |
| 42 | def get_instance_setting(key: str, setting_config: Optional[Tuple] = None) -> InstanceSettingHelper: |
| 43 | setting_config = setting_config or CONSTANCE_CONFIG[key] |
| 44 | is_secret = key in SECRET_SETTINGS |
| 45 | value = get_instance_setting_raw(key) |
| 46 | |
| 47 | return InstanceSettingHelper( |
| 48 | key=key, |
| 49 | value=value if not is_secret or not value else "*****", |
| 50 | value_type=re.sub(r"<class '(\w+)'>", r"\1", str(setting_config[2])), |
| 51 | description=setting_config[1], |
| 52 | editable=key in SETTINGS_ALLOWING_API_OVERRIDE, |
| 53 | is_secret=is_secret, |
| 54 | ) |
| 55 | |
| 56 | |
| 57 | class InstanceSettingsSerializer(serializers.Serializer): |
searching dependent graphs…