diff --git a/mayan/apps/common/migrations/0011_auto_20180429_0758.py b/mayan/apps/common/migrations/0011_auto_20180429_0758.py new file mode 100644 index 0000000000..131b172666 --- /dev/null +++ b/mayan/apps/common/migrations/0011_auto_20180429_0758.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.11 on 2018-04-29 07:58 +from __future__ import unicode_literals + +import common.models +import django.core.files.storage +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('common', '0010_auto_20180403_0702'), + ] + + operations = [ + migrations.AlterField( + model_name='shareduploadedfile', + name='file', + field=models.FileField(storage=django.core.files.storage.FileSystemStorage(location=b'/home/rosarior/development/mayan-edms/mayan/media/shared_files'), upload_to=common.models.upload_to, verbose_name='File'), + ), + ] diff --git a/mayan/apps/common/models.py b/mayan/apps/common/models.py index e76a54a85e..298f1dba0b 100644 --- a/mayan/apps/common/models.py +++ b/mayan/apps/common/models.py @@ -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 .storages import sharedupload_storage +from .storages import storage_sharedupload 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=sharedupload_storage, upload_to=upload_to, + storage=storage_sharedupload, upload_to=upload_to, verbose_name=_('File') ) filename = models.CharField(max_length=255, verbose_name=_('Filename')) diff --git a/mayan/apps/common/storages.py b/mayan/apps/common/storages.py index 87e04b1b64..371ce84d76 100644 --- a/mayan/apps/common/storages.py +++ b/mayan/apps/common/storages.py @@ -8,7 +8,7 @@ from .settings import ( setting_shared_storage, setting_shared_storage_arguments ) -sharedupload_storage = import_string( +storage_sharedupload = import_string( dotted_path=setting_shared_storage.value )( **yaml.safe_load(