django.conf.settings.STORAGES - python examples

Here are the examples of the python api django.conf.settings.STORAGES taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

3 View Complete Implementation : storages.py
Copyright MIT License
Author : harvard-lil
def get_storage(storage_name):
    """ Get a new instance of a storage by looking up its settings in settings.STORAGES. """
    storage_config = settings.STORAGES[storage_name]
    storage_clast_name = storage_config['clast']
    storage_clast = globals_dict[storage_clast_name]
    storage_clast_kwargs = storage_config.get('kwargs', {})
    storage_instance = storage_clast(**storage_clast_kwargs)
    return storage_instance