callable with the same interface as the storage classes this isn t just defaultstorage importstringsettings messagestorage to avoid accessing the settings at the module level callable with the same interface as the storage classes this isn t just default_storage import_string settings message_storage to avoid accessing the settings at the module level
from django.conf import settings
from django.utils.module_loading import import_string


def default_storage(request):
    
    return import_string(settings.MESSAGE_STORAGE)(request)