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
+2 -2
View File
@@ -12,7 +12,7 @@ from django.utils.encoding import force_text, python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from .managers import ErrorLogEntryManager
from .runtime import shared_storage_backend
from .storages import sharedupload_storage
def upload_to(instance, filename):
@@ -47,7 +47,7 @@ class ErrorLogEntry(models.Model):
@python_2_unicode_compatible
class SharedUploadedFile(models.Model):
file = models.FileField(
storage=shared_storage_backend, upload_to=upload_to,
storage=sharedupload_storage, upload_to=upload_to,
verbose_name=_('File')
)
filename = models.CharField(max_length=255, verbose_name=_('Filename'))