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-04-03 02:32:28 -04:00
parent 1076d5f1ff
commit 424d6a5af9
17 changed files with 63 additions and 87 deletions
@@ -1,20 +0,0 @@
from __future__ import unicode_literals
import os
from django.core.files.storage import FileSystemStorage
from django.conf import settings
from .literals import DEFAULT_PATH
class FileBasedStorage(FileSystemStorage):
"""Simple wrapper for the stock Django FileSystemStorage class"""
separator = os.path.sep
def __init__(self, *args, **kwargs):
self.location = kwargs.pop(
'location', os.path.join(settings.MEDIA_ROOT, DEFAULT_PATH)
)
super(FileBasedStorage, self).__init__(*args, **kwargs)
-3
View File
@@ -1,3 +0,0 @@
from __future__ import unicode_literals
DEFAULT_PATH = 'document_storage'