Multiple apps: Sort imports and minor style fixes
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
@@ -9,9 +9,8 @@ from django.utils.module_loading import import_string
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from .literals import (
|
||||
QUERY_OPERATION_AND, QUERY_OPERATION_OR, TERM_OPERATION_OR,
|
||||
TERM_OPERATIONS, TERM_QUOTES, TERM_NEGATION_CHARACTER,
|
||||
TERM_SPACE_CHARACTER
|
||||
QUERY_OPERATION_AND, QUERY_OPERATION_OR, TERM_NEGATION_CHARACTER,
|
||||
TERM_OPERATION_OR, TERM_OPERATIONS, TERM_QUOTES, TERM_SPACE_CHARACTER
|
||||
)
|
||||
from .settings import setting_limit
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
from django.conf import settings
|
||||
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
|
||||
|
||||
@@ -4,7 +4,6 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from mayan.apps.smart_settings import Namespace
|
||||
|
||||
|
||||
namespace = Namespace(name='dynamic_search', label=_('Search'))
|
||||
setting_limit = namespace.add_setting(
|
||||
global_name='SEARCH_LIMIT', default=100,
|
||||
|
||||
@@ -5,8 +5,8 @@ from django.urls import reverse
|
||||
|
||||
from rest_framework import status
|
||||
|
||||
from mayan.apps.documents.search import document_search
|
||||
from mayan.apps.documents.permissions import permission_document_view
|
||||
from mayan.apps.documents.search import document_search
|
||||
from mayan.apps.documents.tests import DocumentTestMixin
|
||||
from mayan.apps.rest_api.tests import BaseAPITestCase
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ from django.test import override_settings
|
||||
from mayan.apps.common.tests import BaseTestCase
|
||||
from mayan.apps.documents.search import document_search
|
||||
from mayan.apps.documents.tests import (
|
||||
DocumentTestMixin, TEST_DOCUMENT_FILENAME, TEST_SMALL_DOCUMENT_FILENAME
|
||||
TEST_DOCUMENT_FILENAME, TEST_SMALL_DOCUMENT_FILENAME, DocumentTestMixin
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,9 @@ from django.test import override_settings
|
||||
from mayan.apps.common.tests import GenericViewTestCase
|
||||
from mayan.apps.documents.models import DocumentType
|
||||
from mayan.apps.documents.search import document_search
|
||||
from mayan.apps.documents.tests import TEST_DOCUMENT_TYPE_LABEL, TEST_SMALL_DOCUMENT_PATH
|
||||
from mayan.apps.documents.tests import (
|
||||
TEST_DOCUMENT_TYPE_LABEL, TEST_SMALL_DOCUMENT_PATH
|
||||
)
|
||||
|
||||
|
||||
@override_settings(OCR_AUTO_OCR=False)
|
||||
|
||||
@@ -2,12 +2,8 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.conf.urls import url
|
||||
|
||||
from .api_views import (
|
||||
APIAdvancedSearchView, APISearchModelList, APISearchView
|
||||
)
|
||||
from .views import (
|
||||
AdvancedSearchView, ResultsView, SearchAgainView, SearchView
|
||||
)
|
||||
from .api_views import APIAdvancedSearchView, APISearchModelList, APISearchView
|
||||
from .views import AdvancedSearchView, ResultsView, SearchAgainView, SearchView
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^(?P<search_model>[\.\w]+)/$', SearchView.as_view(), name='search'),
|
||||
|
||||
@@ -8,7 +8,7 @@ from django.views.generic.base import RedirectView
|
||||
|
||||
from mayan.apps.common.generics import SimpleView, SingleObjectListView
|
||||
|
||||
from .forms import SearchForm, AdvancedSearchForm
|
||||
from .forms import AdvancedSearchForm, SearchForm
|
||||
from .icons import icon_search_submit
|
||||
from .mixins import SearchModelMixin
|
||||
from .settings import setting_limit
|
||||
|
||||
Reference in New Issue
Block a user