Rename shared upload storage from sharedupload_storage to storage_sharedupload

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-04-29 03:32:24 -04:00
parent 018c641e8b
commit 2ef31d2ec3
3 changed files with 25 additions and 3 deletions

View File

@@ -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'),
),
]

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 .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'))

View File

@@ -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(