Made AVAILABLE_INDEXING_FUNCTION setting a setting of the documents app instead of the filesystem_serving app
This commit is contained in:
@@ -6,6 +6,8 @@ from django.conf import settings
|
||||
from django.contrib.auth.models import User
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from common.utils import proper_name
|
||||
|
||||
from storage.backends.filebasedstorage import FileBasedStorage
|
||||
|
||||
default_available_functions = {
|
||||
@@ -20,9 +22,15 @@ available_transformations = {
|
||||
'rotate': {'label':_(u'Rotate [degrees]'), 'arguments':[{'name':'degrees'}]}
|
||||
}
|
||||
|
||||
|
||||
available_indexing_functions = {
|
||||
'proper_name': proper_name
|
||||
}
|
||||
|
||||
# Definition
|
||||
AVAILABLE_FUNCTIONS = getattr(settings, 'DOCUMENTS_METADATA_AVAILABLE_FUNCTIONS', default_available_functions)
|
||||
AVAILABLE_MODELS = getattr(settings, 'DOCUMENTS_METADATA_AVAILABLE_MODELS', default_available_models)
|
||||
AVAILABLE_INDEXING_FUNCTIONS = getattr(settings, 'DOCUMENTS_INDEXING_AVAILABLE_FUNCTIONS', available_indexing_functions)
|
||||
|
||||
# Upload
|
||||
USE_STAGING_DIRECTORY = getattr(settings, 'DOCUMENTS_USE_STAGING_DIRECTORY', False)
|
||||
|
||||
@@ -12,8 +12,8 @@ from python_magic import magic
|
||||
|
||||
from dynamic_search.api import register
|
||||
from converter.api import get_page_count
|
||||
from filesystem_serving.conf.settings import AVAILABLE_INDEXING_FUNCTIONS
|
||||
|
||||
from documents.conf.settings import AVAILABLE_INDEXING_FUNCTIONS
|
||||
from documents.conf.settings import AVAILABLE_FUNCTIONS
|
||||
from documents.conf.settings import AVAILABLE_MODELS
|
||||
from documents.conf.settings import CHECKSUM_FUNCTION
|
||||
|
||||
Reference in New Issue
Block a user