Standardize the way storages are used. All apps that use storage now define their storages in the .storages modules instead of the .runtime module. The storage.backends.filebasedstorage.FileBasedStorage has been remove, instead Django's default storage is used and each app is responsible of specifying their default path.

Signed-off-by: Michael Price <loneviking72@gmail.com>
This commit is contained in:
Michael Price
2018-03-21 19:56:53 -04:00
parent 1076d5f1ff
commit 424d6a5af9
17 changed files with 63 additions and 87 deletions

View File

@@ -1,26 +0,0 @@
from __future__ import unicode_literals
import yaml
from django.utils.module_loading import import_string
from .settings import (
setting_cache_storage_backend, setting_cache_storage_backend_arguments,
setting_storage_backend, setting_storage_backend_arguments
)
storage_backend = import_string(
dotted_path=setting_storage_backend.value
)(
**yaml.safe_load(
setting_storage_backend_arguments.value or '{}'
)
)
cache_storage_backend = import_string(
dotted_path=setting_cache_storage_backend.value
)(
**yaml.safe_load(
setting_cache_storage_backend_arguments.value or '{}'
)
)