Skip to main content

StorageSettingsMixin

This class provides utility methods for managing storage-related configuration and property caching. It facilitates the dynamic resetting of cached property values when specific media or file upload settings change and offers a helper for resolving values against default settings.

Attributes

AttributeTypeDescription
base_locationfile pathThe absolute path to the directory that holds the storage files, derived from the MEDIA_ROOT setting.
locationfile pathThe local filesystem path where files are stored, which is cleared when the MEDIA_ROOT setting changes.
base_urlURLThe URL that serves the files from this storage, derived from the MEDIA_URL setting.
file_permissions_modeintegerThe file system permissions assigned to newly created files, derived from the FILE_UPLOAD_PERMISSIONS setting.
directory_permissions_modeintegerThe file system permissions assigned to newly created directories, derived from the FILE_UPLOAD_DIRECTORY_PERMISSIONS setting.