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:
@@ -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)
|
||||
@@ -1,3 +0,0 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
DEFAULT_PATH = 'document_storage'
|
||||
Reference in New Issue
Block a user