def __init__(self, *args, **kwargs): super(FallbackStorage, self).__init__(*args, **kwargs) # get instances of classes of storages_names self.storages = [get_storage(storage)(*args, **kwargs) for storage in self.storages_names] self._used_storages = set()
from django.conf import settings from django.contrib.messages.storage import get_storage default_storage = lambda request: get_storage(settings.KISS_STORAGE)(request)