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:
22
mayan/apps/common/migrations/0011_auto_20180429_0758.py
Normal file
22
mayan/apps/common/migrations/0011_auto_20180429_0758.py
Normal 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'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -12,7 +12,7 @@ from django.utils.encoding import force_text, python_2_unicode_compatible
|
|||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from .managers import ErrorLogEntryManager
|
from .managers import ErrorLogEntryManager
|
||||||
from .storages import sharedupload_storage
|
from .storages import storage_sharedupload
|
||||||
|
|
||||||
|
|
||||||
def upload_to(instance, filename):
|
def upload_to(instance, filename):
|
||||||
@@ -47,7 +47,7 @@ class ErrorLogEntry(models.Model):
|
|||||||
@python_2_unicode_compatible
|
@python_2_unicode_compatible
|
||||||
class SharedUploadedFile(models.Model):
|
class SharedUploadedFile(models.Model):
|
||||||
file = models.FileField(
|
file = models.FileField(
|
||||||
storage=sharedupload_storage, upload_to=upload_to,
|
storage=storage_sharedupload, upload_to=upload_to,
|
||||||
verbose_name=_('File')
|
verbose_name=_('File')
|
||||||
)
|
)
|
||||||
filename = models.CharField(max_length=255, verbose_name=_('Filename'))
|
filename = models.CharField(max_length=255, verbose_name=_('Filename'))
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from .settings import (
|
|||||||
setting_shared_storage, setting_shared_storage_arguments
|
setting_shared_storage, setting_shared_storage_arguments
|
||||||
)
|
)
|
||||||
|
|
||||||
sharedupload_storage = import_string(
|
storage_sharedupload = import_string(
|
||||||
dotted_path=setting_shared_storage.value
|
dotted_path=setting_shared_storage.value
|
||||||
)(
|
)(
|
||||||
**yaml.safe_load(
|
**yaml.safe_load(
|
||||||
|
|||||||
Reference in New Issue
Block a user