Multiple apps: Sort imports and minor style fixes
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
@@ -1,37 +1,41 @@
|
||||
from __future__ import absolute_import, unicode_literals
|
||||
|
||||
from kombu import Exchange, Queue
|
||||
|
||||
from django.apps import apps
|
||||
from django.db.models.signals import post_delete, post_save, pre_delete
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from kombu import Exchange, Queue
|
||||
|
||||
from mayan.apps.acls import ModelPermission
|
||||
from mayan.apps.acls.links import link_acl_list
|
||||
from mayan.apps.acls.permissions import permission_acl_edit, permission_acl_view
|
||||
from mayan.apps.acls.permissions import (
|
||||
permission_acl_edit, permission_acl_view
|
||||
)
|
||||
from mayan.apps.common import (
|
||||
MayanAppConfig, menu_facet, menu_list_facet, menu_main, menu_object,
|
||||
menu_secondary, menu_setup, menu_tools
|
||||
)
|
||||
from mayan.apps.common.widgets import TwoStateWidget
|
||||
from mayan.apps.documents.signals import post_document_created, post_initial_document_type
|
||||
from mayan.apps.documents.signals import (
|
||||
post_document_created, post_initial_document_type
|
||||
)
|
||||
from mayan.apps.navigation import SourceColumn
|
||||
from mayan.celery import app
|
||||
|
||||
from .handlers import (
|
||||
create_default_document_index, handler_delete_empty,
|
||||
handler_index_document, handler_remove_document,
|
||||
handler_post_save_index_document
|
||||
handler_index_document, handler_post_save_index_document,
|
||||
handler_remove_document
|
||||
)
|
||||
from .licenses import * # NOQA
|
||||
from .links import (
|
||||
link_document_index_list, link_index_main_menu, link_index_setup,
|
||||
link_index_setup_create, link_index_setup_document_types,
|
||||
link_index_setup_delete, link_index_setup_edit, link_index_setup_list,
|
||||
link_index_setup_view, link_rebuild_index_instances,
|
||||
link_index_setup_create, link_index_setup_delete,
|
||||
link_index_setup_document_types, link_index_setup_edit,
|
||||
link_index_setup_list, link_index_setup_view, link_rebuild_index_instances,
|
||||
link_template_node_create, link_template_node_delete,
|
||||
link_template_node_edit
|
||||
)
|
||||
from .licenses import * # NOQA
|
||||
from .permissions import (
|
||||
permission_document_indexing_create, permission_document_indexing_delete,
|
||||
permission_document_indexing_edit,
|
||||
|
||||
@@ -2,16 +2,16 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from mayan.apps.navigation import Link, get_cascade_condition
|
||||
from mayan.apps.documents.icons import icon_document_type
|
||||
from mayan.apps.navigation import Link, get_cascade_condition
|
||||
|
||||
from .icons import (
|
||||
icon_document_index_list, icon_index, icon_index_create,
|
||||
icon_index_setup_view, icon_rebuild_index_instances,
|
||||
icon_index_setup_view, icon_rebuild_index_instances
|
||||
)
|
||||
from .permissions import (
|
||||
permission_document_indexing_create, permission_document_indexing_edit,
|
||||
permission_document_indexing_delete,
|
||||
permission_document_indexing_create, permission_document_indexing_delete,
|
||||
permission_document_indexing_edit,
|
||||
permission_document_indexing_instance_view,
|
||||
permission_document_indexing_rebuild, permission_document_indexing_view
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
from django.db import migrations, models
|
||||
|
||||
import mptt.fields
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.6 on 2017-05-24 04:56
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.7 on 2017-05-30 07:28
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
@@ -16,16 +14,28 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='index',
|
||||
name='slug',
|
||||
field=models.SlugField(help_text='This value will be used by other apps to reference this index.', max_length=128, unique=True, verbose_name='Slug'),
|
||||
field=models.SlugField(
|
||||
help_text='This value will be used by other apps to '
|
||||
'reference this index.', max_length=128, unique=True,
|
||||
verbose_name='Slug'
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='indexinstancenode',
|
||||
name='documents',
|
||||
field=models.ManyToManyField(related_name='index_instance_nodes', to='documents.Document', verbose_name='Documents'),
|
||||
field=models.ManyToManyField(
|
||||
related_name='index_instance_nodes', to='documents.Document',
|
||||
verbose_name='Documents'
|
||||
),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='indexinstancenode',
|
||||
name='index_template_node',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='index_instance_nodes', to='document_indexing.IndexTemplateNode', verbose_name='Index template node'),
|
||||
field=models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name='index_instance_nodes',
|
||||
to='document_indexing.IndexTemplateNode',
|
||||
verbose_name='Index template node'
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.10.7 on 2017-07-14 21:33
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
@@ -14,6 +12,10 @@ class Migration(migrations.Migration):
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='index',
|
||||
options={'ordering': ('label',), 'verbose_name': 'Index', 'verbose_name_plural': 'Indexes'},
|
||||
options={
|
||||
'ordering': ('label',),
|
||||
'verbose_name': 'Index',
|
||||
'verbose_name_plural': 'Indexes'
|
||||
},
|
||||
),
|
||||
]
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.11 on 2018-08-23 23:53
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
@@ -15,6 +13,10 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='indextemplatenode',
|
||||
name='expression',
|
||||
field=models.TextField(help_text="Enter a template to render. Use Django's default templating language (https://docs.djangoproject.com/en/1.11/ref/templates/builtins/)", verbose_name='Indexing expression'),
|
||||
field=models.TextField(
|
||||
help_text="Enter a template to render. Use Django's default "
|
||||
"templating language (https://docs.djangoproject.com/en/1.11/"
|
||||
"ref/templates/builtins/)", verbose_name='Indexing expression'
|
||||
),
|
||||
),
|
||||
]
|
||||
|
||||
@@ -7,7 +7,8 @@ from jinja2 import Template
|
||||
from django.db import models, transaction
|
||||
from django.urls import reverse
|
||||
from django.utils.encoding import force_text, python_2_unicode_compatible
|
||||
from django.utils.translation import ugettext, ugettext_lazy as _
|
||||
from django.utils.translation import ugettext
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from mptt.fields import TreeForeignKey
|
||||
from mptt.models import MPTTModel
|
||||
@@ -19,7 +20,7 @@ from mayan.apps.lock_manager import LockError
|
||||
from mayan.apps.lock_manager.runtime import locking_backend
|
||||
|
||||
from .managers import (
|
||||
DocumentIndexInstanceNodeManager, IndexManager, IndexInstanceNodeManager
|
||||
DocumentIndexInstanceNodeManager, IndexInstanceNodeManager, IndexManager
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -5,13 +5,13 @@ from django.utils.encoding import force_text
|
||||
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.documents.tests import (
|
||||
DocumentTestMixin, TEST_SMALL_DOCUMENT_PATH
|
||||
TEST_SMALL_DOCUMENT_PATH, DocumentTestMixin
|
||||
)
|
||||
from mayan.apps.documents.tests.literals import (
|
||||
TEST_DOCUMENT_DESCRIPTION, TEST_DOCUMENT_DESCRIPTION_EDITED,
|
||||
TEST_DOCUMENT_LABEL_EDITED
|
||||
)
|
||||
from mayan.apps.metadata.models import MetadataType, DocumentTypeMetadataType
|
||||
from mayan.apps.metadata.models import DocumentTypeMetadataType, MetadataType
|
||||
|
||||
from ..models import Index, IndexInstanceNode, IndexTemplateNode
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ from .api_views import (
|
||||
)
|
||||
from .views import (
|
||||
DocumentIndexNodeListView, IndexInstanceNodeView, IndexListView,
|
||||
RebuildIndexesView, SetupIndexDocumentTypesView, SetupIndexCreateView,
|
||||
SetupIndexDeleteView, SetupIndexEditView, SetupIndexListView,
|
||||
RebuildIndexesView, SetupIndexCreateView, SetupIndexDeleteView,
|
||||
SetupIndexDocumentTypesView, SetupIndexEditView, SetupIndexListView,
|
||||
SetupIndexTreeTemplateListView, TemplateNodeCreateView,
|
||||
TemplateNodeDeleteView, TemplateNodeEditView
|
||||
)
|
||||
|
||||
@@ -5,12 +5,13 @@ from django.shortcuts import get_object_or_404
|
||||
from django.template import RequestContext
|
||||
from django.urls import reverse, reverse_lazy
|
||||
from django.utils.html import mark_safe
|
||||
from django.utils.translation import ugettext_lazy as _, ungettext
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import ungettext
|
||||
|
||||
from mayan.apps.acls.models import AccessControlList
|
||||
from mayan.apps.common.views import (
|
||||
AssignRemoveView, FormView, SingleObjectCreateView,
|
||||
SingleObjectDeleteView, SingleObjectEditView, SingleObjectListView
|
||||
AssignRemoveView, FormView, SingleObjectCreateView, SingleObjectDeleteView,
|
||||
SingleObjectEditView, SingleObjectListView
|
||||
)
|
||||
from mayan.apps.documents.models import Document, DocumentType
|
||||
from mayan.apps.documents.permissions import permission_document_view
|
||||
|
||||
@@ -2,7 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.apps import apps
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.html import mark_safe, escape
|
||||
from django.utils.html import escape, mark_safe
|
||||
|
||||
from .icons import icon_index, icon_index_level_up, icon_node_with_documents
|
||||
|
||||
|
||||
Reference in New Issue
Block a user