(key: str, value: Any)
This method sets the :param value: for the given :param key:.
This method sets the :param value: for the given :param key:.
This method sets the : param value : for the given : param key : .
def set(key: str, value: Any) -> None:
    """This method sets the :param value: for the given :param key:."""
    default = defaults[key]
    setting = models.Setting.objects.get_or_create(
        key=key, defaults={"value": str(default)}
    )[0]
    setting.value = value
    setting.save()
    cache.clear()
def set ( key : str , value : Any ) -> None : default = defaults [ key ] setting = models . Setting . objects . get_or_create ( key = key , defaults = { "value" : str ( default ) } ) [ 0 ] setting . value = value setting . save ( ) cache . clear ( )