Style cleanups
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -26,7 +26,9 @@ class ACLAPITestCase(ACLTestMixin, BaseAPITestCase):
|
||||
)
|
||||
|
||||
def test_acl_create_api_api_view_with_access(self):
|
||||
self.grant_access(obj=self.test_object, permission=permission_acl_edit)
|
||||
self.grant_access(
|
||||
obj=self.test_object, permission=permission_acl_edit
|
||||
)
|
||||
|
||||
response = self._request_acl_create_api_view()
|
||||
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
|
||||
@@ -44,7 +46,9 @@ class ACLAPITestCase(ACLTestMixin, BaseAPITestCase):
|
||||
)
|
||||
|
||||
def test_acl_create_post_api_extra_data_view_with_access(self):
|
||||
self.grant_access(obj=self.test_object, permission=permission_acl_edit)
|
||||
self.grant_access(
|
||||
obj=self.test_object, permission=permission_acl_edit
|
||||
)
|
||||
|
||||
response = self._request_acl_create_api_view(
|
||||
extra_data={'permissions_pk_list': permission_acl_view.pk}
|
||||
@@ -112,7 +116,9 @@ class ACLAPITestCase(ACLTestMixin, BaseAPITestCase):
|
||||
def test_acl_detail_api_view_with_access(self):
|
||||
self._create_test_acl()
|
||||
|
||||
self.grant_access(obj=self.test_object, permission=permission_acl_view)
|
||||
self.grant_access(
|
||||
obj=self.test_object, permission=permission_acl_view
|
||||
)
|
||||
|
||||
response = self._request_test_acl_detail_api_view()
|
||||
|
||||
@@ -139,7 +145,9 @@ class ACLAPITestCase(ACLTestMixin, BaseAPITestCase):
|
||||
self._create_test_acl()
|
||||
self.test_acl.permissions.add(self.test_permission.stored_permission)
|
||||
|
||||
self.grant_access(obj=self.test_object, permission=permission_acl_view)
|
||||
self.grant_access(
|
||||
obj=self.test_object, permission=permission_acl_view
|
||||
)
|
||||
|
||||
response = self._request_test_acl_permission_detail_api_view()
|
||||
self.assertEqual(
|
||||
@@ -149,7 +157,9 @@ class ACLAPITestCase(ACLTestMixin, BaseAPITestCase):
|
||||
def test_acl_list_api_view_with_access(self):
|
||||
self._create_test_acl()
|
||||
|
||||
self.grant_access(obj=self.test_object, permission=permission_acl_view)
|
||||
self.grant_access(
|
||||
obj=self.test_object, permission=permission_acl_view
|
||||
)
|
||||
|
||||
response = self.get(
|
||||
viewname='rest_api:accesscontrollist-list', kwargs={
|
||||
@@ -192,7 +202,9 @@ class ACLAPITestCase(ACLTestMixin, BaseAPITestCase):
|
||||
self._create_test_acl()
|
||||
self.test_acl.permissions.add(self.test_permission.stored_permission)
|
||||
|
||||
self.grant_access(obj=self.test_object, permission=permission_acl_view)
|
||||
self.grant_access(
|
||||
obj=self.test_object, permission=permission_acl_view
|
||||
)
|
||||
|
||||
response = self._request_test_acl_permission_list_api_get_view()
|
||||
self.assertEqual(
|
||||
@@ -213,7 +225,9 @@ class ACLAPITestCase(ACLTestMixin, BaseAPITestCase):
|
||||
def test_acl_permission_list_api_post_view_with_access(self):
|
||||
self._create_test_acl()
|
||||
|
||||
self.grant_access(obj=self.test_object, permission=permission_acl_edit)
|
||||
self.grant_access(
|
||||
obj=self.test_object, permission=permission_acl_edit
|
||||
)
|
||||
|
||||
response = self._request_acl_permssion_list_api_post_view()
|
||||
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
|
||||
|
||||
@@ -178,7 +178,9 @@ class InheritedPermissionTestCase(ACLTestMixin, BaseTestCase):
|
||||
queryset = AccessControlList.objects.get_inherited_permissions(
|
||||
obj=self.test_object, role=self.test_role
|
||||
)
|
||||
self.assertTrue(self.test_permission.stored_permission not in queryset)
|
||||
self.assertTrue(
|
||||
self.test_permission.stored_permission not in queryset
|
||||
)
|
||||
|
||||
def test_retrieve_inherited_role_permission_model_applicable(self):
|
||||
self.TestModel = self._create_test_model()
|
||||
|
||||
@@ -30,7 +30,9 @@ class ACLActionTestCase(ActionTestCase):
|
||||
list(self.test_document.acls.first().permissions.all()),
|
||||
[permission_document_view.stored_permission]
|
||||
)
|
||||
self.assertEqual(self.test_document.acls.first().role, self._test_case_role)
|
||||
self.assertEqual(
|
||||
self.test_document.acls.first().role, self._test_case_role
|
||||
)
|
||||
|
||||
def test_grant_document_access_action(self):
|
||||
action = GrantDocumentAccessAction(
|
||||
@@ -46,7 +48,9 @@ class ACLActionTestCase(ActionTestCase):
|
||||
list(self.test_document.acls.first().permissions.all()),
|
||||
[permission_document_view.stored_permission]
|
||||
)
|
||||
self.assertEqual(self.test_document.acls.first().role, self._test_case_role)
|
||||
self.assertEqual(
|
||||
self.test_document.acls.first().role, self._test_case_role
|
||||
)
|
||||
|
||||
def test_revoke_access_action(self):
|
||||
self.grant_access(
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.22 on 2019-07-29 02:36
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.20 on 2019-07-25 04:52
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.22 on 2019-08-14 05:10
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.22 on 2019-10-05 06:47
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
@@ -31,7 +31,8 @@ class Migration(migrations.Migration):
|
||||
name='document_version',
|
||||
field=models.ForeignKey(
|
||||
related_name='signatures', editable=False,
|
||||
to='documents.DocumentVersion', verbose_name='Document version'
|
||||
to='documents.DocumentVersion',
|
||||
verbose_name='Document version'
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.22 on 2019-07-11 05:44
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
@@ -17,6 +15,11 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='detachedsignature',
|
||||
name='signature_file',
|
||||
field=models.FileField(blank=True, null=True, storage=mayan.apps.storage.classes.FakeStorageSubclass(), upload_to=mayan.apps.document_signatures.models.upload_to, verbose_name='Signature file'),
|
||||
field=models.FileField(
|
||||
blank=True, null=True,
|
||||
storage=mayan.apps.storage.classes.FakeStorageSubclass(),
|
||||
upload_to=mayan.apps.document_signatures.models.upload_to,
|
||||
verbose_name='Signature file'
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -18,7 +18,7 @@ class Migration(migrations.Migration):
|
||||
'ordering': ('pk',),
|
||||
'verbose_name': 'Document version signature',
|
||||
'verbose_name_plural': 'Document version signatures'
|
||||
},
|
||||
},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='detachedsignature',
|
||||
|
||||
@@ -56,7 +56,9 @@ class DocumentSignatureLinksTestCase(
|
||||
resolved_link.url,
|
||||
reverse(
|
||||
viewname=link_document_version_signature_details.view,
|
||||
args=(self.test_document.latest_version.signatures.first().pk,)
|
||||
kwargs={
|
||||
'pk': self.test_document.latest_version.signatures.first().pk,
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
@@ -98,6 +100,8 @@ class DocumentSignatureLinksTestCase(
|
||||
resolved_link.url,
|
||||
reverse(
|
||||
viewname=link_document_version_signature_delete.view,
|
||||
args=(self.test_document.latest_version.signatures.first().pk,)
|
||||
kwargs={
|
||||
'pk': self.test_document.latest_version.signatures.first().pk,
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
@@ -13,7 +13,8 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterModelOptions(
|
||||
name='workflowinstance',
|
||||
options={
|
||||
'ordering': ('workflow',), 'verbose_name': 'Workflow instance',
|
||||
'ordering': ('workflow',),
|
||||
'verbose_name': 'Workflow instance',
|
||||
'verbose_name_plural': 'Workflow instances'
|
||||
},
|
||||
),
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.20 on 2019-07-01 04:54
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
@@ -16,13 +14,55 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='WorkflowTransitionField',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('field_type', models.PositiveIntegerField(choices=[(1, 'Character'), (2, 'Number (Integer)')], verbose_name='Type')),
|
||||
('name', models.CharField(help_text='The name that will be used to identify this field in other parts of the workflow system.', max_length=128, verbose_name='Internal name')),
|
||||
('label', models.CharField(help_text='The field name that will be shown on the user interface.', max_length=128, verbose_name='Label')),
|
||||
('help_text', models.TextField(blank=True, help_text='An optional message that will help users better understand the purpose of the field and data to provide.', verbose_name='Help text')),
|
||||
('required', models.BooleanField(default=False, help_text='Whether this fields needs to be filled out or not to proceed.', verbose_name='Required')),
|
||||
('transition', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='fields', to='document_states.WorkflowTransition', verbose_name='Transition')),
|
||||
(
|
||||
'id', models.AutoField(
|
||||
auto_created=True, primary_key=True, serialize=False,
|
||||
verbose_name='ID'
|
||||
)
|
||||
),
|
||||
(
|
||||
'field_type', models.PositiveIntegerField(
|
||||
choices=[(1, 'Character'), (2, 'Number (Integer)')],
|
||||
verbose_name='Type'
|
||||
)
|
||||
),
|
||||
(
|
||||
'name', models.CharField(
|
||||
help_text='The name that will be used to identify '
|
||||
'this field in other parts of the workflow system.',
|
||||
max_length=128, verbose_name='Internal name'
|
||||
)
|
||||
),
|
||||
(
|
||||
'label', models.CharField(
|
||||
help_text='The field name that will be shown on '
|
||||
'the user interface.', max_length=128,
|
||||
verbose_name='Label'
|
||||
)
|
||||
),
|
||||
(
|
||||
'help_text', models.TextField(
|
||||
blank=True, help_text='An optional message that '
|
||||
'will help users better understand the purpose '
|
||||
'of the field and data to provide.',
|
||||
verbose_name='Help text'
|
||||
)
|
||||
),
|
||||
(
|
||||
'required', models.BooleanField(
|
||||
default=False, help_text='Whether this fields '
|
||||
'needs to be filled out or not to proceed.',
|
||||
verbose_name='Required'
|
||||
)
|
||||
),
|
||||
(
|
||||
'transition', models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name='fields',
|
||||
to='document_states.WorkflowTransition',
|
||||
verbose_name='Transition'
|
||||
)
|
||||
),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Workflow transition trigger event',
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.20 on 2019-07-01 13:11
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
@@ -16,12 +14,23 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='workflowtransitionfield',
|
||||
name='widget',
|
||||
field=models.PositiveIntegerField(blank=True, choices=[(1, 'Text area')], help_text='An optional class to change the default presentation of the field.', null=True, verbose_name='Widget class'),
|
||||
field=models.PositiveIntegerField(
|
||||
blank=True, choices=[(1, 'Text area')],
|
||||
help_text='An optional class to change the default '
|
||||
'presentation of the field.', null=True,
|
||||
verbose_name='Widget class'
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='workflowtransitionfield',
|
||||
name='widget_kwargs',
|
||||
field=models.TextField(blank=True, help_text='A group of keyword arguments to customize the widget. Use YAML format.', validators=[mayan.apps.common.validators.YAMLValidator()], verbose_name='Widget keyword arguments'),
|
||||
field=models.TextField(
|
||||
blank=True,
|
||||
help_text='A group of keyword arguments to customize the '
|
||||
'widget. Use YAML format.', validators=[
|
||||
mayan.apps.common.validators.YAMLValidator()
|
||||
], verbose_name='Widget keyword arguments'
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='workflowinstance',
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.25 on 2019-11-08 23:32
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
@@ -15,16 +13,31 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='workflowstate',
|
||||
name='completion',
|
||||
field=models.IntegerField(blank=True, default=0, help_text='The percent of completion that this state represents in relation to the workflow. Use numbers without the percent sign.', verbose_name='Completion'),
|
||||
field=models.IntegerField(
|
||||
blank=True, default=0,
|
||||
help_text='The percent of completion that this state '
|
||||
'represents in relation to the workflow. Use numbers '
|
||||
'without the percent sign.', verbose_name='Completion'
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='workflowstate',
|
||||
name='initial',
|
||||
field=models.BooleanField(default=False, help_text='The state at which the workflow will start in. Only one state can be the initial state.', verbose_name='Initial'),
|
||||
field=models.BooleanField(
|
||||
default=False, help_text='The state at which the '
|
||||
'workflow will start in. Only one state can be the '
|
||||
'initial state.', verbose_name='Initial'
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='workflowstateaction',
|
||||
name='when',
|
||||
field=models.PositiveIntegerField(choices=[(1, 'On entry'), (2, 'On exit')], default=1, help_text='At which moment of the state this action will execute.', verbose_name='When'),
|
||||
field=models.PositiveIntegerField(
|
||||
choices=[
|
||||
(1, 'On entry'), (2, 'On exit')
|
||||
], default=1,
|
||||
help_text='At which moment of the state this action '
|
||||
'will execute.', verbose_name='When'
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -13,8 +13,17 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='DocumentPageCachedImage',
|
||||
fields=[
|
||||
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
||||
('filename', models.CharField(max_length=128, verbose_name='Filename')),
|
||||
(
|
||||
'id', models.AutoField(
|
||||
verbose_name='ID', serialize=False,
|
||||
auto_created=True, primary_key=True
|
||||
)
|
||||
),
|
||||
(
|
||||
'filename', models.CharField(
|
||||
max_length=128, verbose_name='Filename'
|
||||
)
|
||||
),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Document page cached image',
|
||||
@@ -36,6 +45,9 @@ class Migration(migrations.Migration):
|
||||
migrations.AddField(
|
||||
model_name='documentpagecachedimage',
|
||||
name='document_page',
|
||||
field=models.ForeignKey(related_name='cached_images', verbose_name='Document page', to='documents.DocumentPage'),
|
||||
field=models.ForeignKey(
|
||||
related_name='cached_images', verbose_name='Document page',
|
||||
to='documents.DocumentPage'
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -13,7 +13,8 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterModelOptions(
|
||||
name='documentversion',
|
||||
options={
|
||||
'ordering': ('timestamp',), 'verbose_name': 'Document version',
|
||||
'ordering': ('timestamp',),
|
||||
'verbose_name': 'Document version',
|
||||
'verbose_name_plural': 'Document version'
|
||||
},
|
||||
),
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.22 on 2019-07-11 05:44
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
@@ -17,6 +15,10 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='documentversion',
|
||||
name='file',
|
||||
field=models.FileField(storage=mayan.apps.storage.classes.FakeStorageSubclass(), upload_to=mayan.apps.documents.models.document_version_models.UUID_FUNCTION, verbose_name='File'),
|
||||
field=models.FileField(
|
||||
storage=mayan.apps.storage.classes.FakeStorageSubclass(),
|
||||
upload_to=mayan.apps.documents.models.document_version_models.UUID_FUNCTION,
|
||||
verbose_name='File'
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.20 on 2019-07-25 04:51
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
@@ -15,6 +13,10 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='document',
|
||||
name='language',
|
||||
field=models.CharField(blank=True, default='eng', help_text='The dominant language in the document.', max_length=8, verbose_name='Language'),
|
||||
field=models.CharField(
|
||||
blank=True, default='eng',
|
||||
help_text='The dominant language in the document.',
|
||||
max_length=8, verbose_name='Language'
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.22 on 2019-07-29 07:03
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
@@ -15,11 +15,33 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='Cache',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=128, unique=True, verbose_name='Name')),
|
||||
('label', models.CharField(max_length=128, verbose_name='Label')),
|
||||
('maximum_size', models.PositiveIntegerField(verbose_name='Maximum size')),
|
||||
('storage_instance_path', models.CharField(max_length=255, unique=True, verbose_name='Storage instance path')),
|
||||
(
|
||||
'id', models.AutoField(
|
||||
auto_created=True, primary_key=True, serialize=False,
|
||||
verbose_name='ID'
|
||||
)
|
||||
),
|
||||
(
|
||||
'name', models.CharField(
|
||||
max_length=128, unique=True, verbose_name='Name'
|
||||
)
|
||||
),
|
||||
(
|
||||
'label', models.CharField(
|
||||
max_length=128, verbose_name='Label'
|
||||
)
|
||||
),
|
||||
(
|
||||
'maximum_size', models.PositiveIntegerField(
|
||||
verbose_name='Maximum size'
|
||||
)
|
||||
),
|
||||
(
|
||||
'storage_instance_path', models.CharField(
|
||||
max_length=255, unique=True,
|
||||
verbose_name='Storage instance path'
|
||||
)
|
||||
),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Cache',
|
||||
@@ -29,9 +51,24 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='CachePartition',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=128, verbose_name='Name')),
|
||||
('cache', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='partitions', to='file_caching.Cache', verbose_name='Cache')),
|
||||
(
|
||||
'id', models.AutoField(
|
||||
auto_created=True, primary_key=True, serialize=False,
|
||||
verbose_name='ID'
|
||||
)
|
||||
),
|
||||
(
|
||||
'name', models.CharField(
|
||||
max_length=128, verbose_name='Name'
|
||||
)
|
||||
),
|
||||
(
|
||||
'cache', models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name='partitions', to='file_caching.Cache',
|
||||
verbose_name='Cache'
|
||||
)
|
||||
),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Cache partition',
|
||||
@@ -41,11 +78,36 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='CachePartitionFile',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('datetime', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Date time')),
|
||||
('filename', models.CharField(max_length=255, verbose_name='Filename')),
|
||||
('file_size', models.PositiveIntegerField(default=0, verbose_name='File size')),
|
||||
('partition', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files', to='file_caching.CachePartition', verbose_name='Cache partition')),
|
||||
(
|
||||
'id', models.AutoField(
|
||||
auto_created=True, primary_key=True, serialize=False,
|
||||
verbose_name='ID'
|
||||
)
|
||||
),
|
||||
(
|
||||
'datetime', models.DateTimeField(
|
||||
auto_now_add=True, db_index=True,
|
||||
verbose_name='Date time'
|
||||
)
|
||||
),
|
||||
(
|
||||
'filename', models.CharField(
|
||||
max_length=255, verbose_name='Filename'
|
||||
)
|
||||
),
|
||||
(
|
||||
'file_size', models.PositiveIntegerField(
|
||||
default=0, verbose_name='File size'
|
||||
)
|
||||
),
|
||||
(
|
||||
'partition', models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name='files',
|
||||
to='file_caching.CachePartition',
|
||||
verbose_name='Cache partition'
|
||||
)
|
||||
),
|
||||
],
|
||||
options={
|
||||
'get_latest_by': 'datetime',
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.22 on 2019-07-29 02:36
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
@@ -15,21 +13,34 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='cache',
|
||||
name='label',
|
||||
field=models.CharField(help_text='A short text describing the cache.', max_length=128, verbose_name='Label'),
|
||||
field=models.CharField(
|
||||
help_text='A short text describing the cache.',
|
||||
max_length=128, verbose_name='Label'
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cache',
|
||||
name='maximum_size',
|
||||
field=models.PositiveIntegerField(help_text='Maximum size of the cache in bytes.', verbose_name='Maximum size'),
|
||||
field=models.PositiveIntegerField(
|
||||
help_text='Maximum size of the cache in bytes.',
|
||||
verbose_name='Maximum size'
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cache',
|
||||
name='name',
|
||||
field=models.CharField(help_text='Internal name of the cache.', max_length=128, unique=True, verbose_name='Name'),
|
||||
field=models.CharField(
|
||||
help_text='Internal name of the cache.', max_length=128,
|
||||
unique=True, verbose_name='Name'
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='cache',
|
||||
name='storage_instance_path',
|
||||
field=models.CharField(help_text='Dotted path to the actual storage class used for the cache.', max_length=255, unique=True, verbose_name='Storage instance path'),
|
||||
field=models.CharField(
|
||||
help_text='Dotted path to the actual storage class used '
|
||||
'for the cache.', max_length=255, unique=True,
|
||||
verbose_name='Storage instance path'
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.20 on 2019-06-12 05:26
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.22 on 2019-10-05 06:46
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
@@ -15,6 +13,9 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='metadatatype',
|
||||
name='label',
|
||||
field=models.CharField(help_text='Short description of this metadata type.', max_length=48, verbose_name='Label'),
|
||||
field=models.CharField(
|
||||
help_text='Short description of this metadata type.',
|
||||
max_length=48, verbose_name='Label'
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -28,9 +28,9 @@ class Migration(migrations.Migration):
|
||||
name='subject_metadata_type',
|
||||
field=models.ForeignKey(
|
||||
related_name='email_subject', blank=True,
|
||||
to='metadata.MetadataType', help_text="Select a metadata "
|
||||
"type valid for the document type selected in which to store "
|
||||
"the email's subject.", null=True,
|
||||
to='metadata.MetadataType', help_text='Select a metadata '
|
||||
'type valid for the document type selected in which to '
|
||||
'store the email\'s subject.', null=True,
|
||||
verbose_name='Subject metadata type'
|
||||
),
|
||||
preserve_default=True,
|
||||
|
||||
@@ -24,8 +24,9 @@ class Migration(migrations.Migration):
|
||||
),
|
||||
(
|
||||
'device_name', models.CharField(
|
||||
help_text='Device name as returned by the SANE backend.',
|
||||
max_length=255, verbose_name='Device name'
|
||||
help_text='Device name as returned by the SANE '
|
||||
'backend.', max_length=255,
|
||||
verbose_name='Device name'
|
||||
)
|
||||
),
|
||||
],
|
||||
|
||||
@@ -17,9 +17,10 @@ class Migration(migrations.Migration):
|
||||
blank=True, choices=[
|
||||
('simplex', 'Simples'), ('duplex', 'Duplex')
|
||||
], default='simplex',
|
||||
help_text='Selects the document feeder mode (simplex/duplex). '
|
||||
'If this option is not supported by your scanner, leave it '
|
||||
'blank.', max_length=16, verbose_name='ADF mode'
|
||||
help_text='Selects the document feeder mode '
|
||||
'(simplex/duplex). If this option is not supported by '
|
||||
'your scanner, leave it blank.', max_length=16,
|
||||
verbose_name='ADF mode'
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
@@ -30,8 +31,8 @@ class Migration(migrations.Migration):
|
||||
('flatbed', 'Flatbed'),
|
||||
('document-feeder', 'Document feeder')
|
||||
], default='flatbed', help_text='Selects the scan source '
|
||||
'(such as a document-feeder). If this option is not supported '
|
||||
'by your scanner, leave it blank.', max_length=16,
|
||||
'(such as a document-feeder). If this option is not '
|
||||
'supported by your scanner, leave it blank.', max_length=16,
|
||||
verbose_name='Paper source'
|
||||
),
|
||||
),
|
||||
|
||||
@@ -17,9 +17,10 @@ class Migration(migrations.Migration):
|
||||
blank=True, choices=[
|
||||
('simplex', 'Simplex'), ('duplex', 'Duplex')
|
||||
],
|
||||
help_text='Selects the document feeder mode (simplex/duplex). '
|
||||
'If this option is not supported by your scanner, leave it '
|
||||
'blank.', max_length=16, verbose_name='ADF mode'
|
||||
help_text='Selects the document feeder mode '
|
||||
'(simplex/duplex). If this option is not supported by your '
|
||||
'scanner, leave it blank.', max_length=16,
|
||||
verbose_name='ADF mode'
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.22 on 2019-07-27 04:29
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
@@ -17,11 +15,38 @@ class Migration(migrations.Migration):
|
||||
migrations.CreateModel(
|
||||
name='WebLink',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('label', models.CharField(db_index=True, help_text='A short text describing the weblink.', max_length=96, verbose_name='Label')),
|
||||
('template', models.TextField(help_text='Template that will be used to craft the final URL of the weblink. The {{ document }} variable is available to the template.', verbose_name='Template')),
|
||||
('enabled', models.BooleanField(default=True, verbose_name='Enabled')),
|
||||
('document_types', models.ManyToManyField(related_name='web_links', to='documents.DocumentType', verbose_name='Document types')),
|
||||
(
|
||||
'id', models.AutoField(
|
||||
auto_created=True, primary_key=True, serialize=False,
|
||||
verbose_name='ID'
|
||||
)
|
||||
),
|
||||
(
|
||||
'label', models.CharField(
|
||||
db_index=True, help_text='A short text describing '
|
||||
'the weblink.', max_length=96, verbose_name='Label'
|
||||
)
|
||||
),
|
||||
(
|
||||
'template', models.TextField(
|
||||
help_text='Template that will be used to craft the '
|
||||
'final URL of the weblink. The {{ document }} '
|
||||
'variable is available to the template.',
|
||||
verbose_name='Template'
|
||||
)
|
||||
),
|
||||
(
|
||||
'enabled', models.BooleanField(
|
||||
default=True, verbose_name='Enabled'
|
||||
)
|
||||
),
|
||||
(
|
||||
'document_types', models.ManyToManyField(
|
||||
related_name='web_links',
|
||||
to='documents.DocumentType',
|
||||
verbose_name='Document types'
|
||||
)
|
||||
),
|
||||
],
|
||||
options={
|
||||
'ordering': ('label',),
|
||||
|
||||
Reference in New Issue
Block a user