def get_backend(): if not conf.METADATA.get('BACKEND'): raise ValueError('BACKEND for STORAGE must be defined') metadata = import_attribute(conf.METADATA['BACKEND']) return metadata()
def get_backend(): if not conf.STORAGE.get('BACKEND'): raise ValueError('BACKEND for STORAGE must be defined') backend = import_attribute(conf.STORAGE['BACKEND']) return backend()