Skip to main content

static_storage_changed

Resets the cached static files storage instance when relevant Django settings, such as STATIC_ROOT or STATIC_URL, are modified.

def static_storage_changed(
setting: string,
**kwargs: dict
) - > null

Resets the cached static files storage instance when relevant Django settings are modified. This ensures that changes to STATIC_ROOT or STATIC_URL are reflected in the storage backend immediately without requiring a process restart.

Parameters

NameTypeDescription
settingstringThe name of the Django setting that was changed, used to determine if a storage reset is necessary.
**kwargsdictAdditional keyword arguments passed by the setting_changed signal dispatcher.

Returns

TypeDescription
nullNothing is returned; the function performs an in-place reset of the staticfiles_storage singleton.