Instead of inserting the path of the apps into the Python app, the apps are now referenced by their full import path. This solves name clashes with external or native Python libraries. Example: Mayan statistics app vs. Python new statistics library. Every app reference is now prepended with 'mayan.apps'. Existing config.yml files need to be updated manually. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
24 lines
712 B
Python
24 lines
712 B
Python
from __future__ import unicode_literals
|
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
from mayan.apps.smart_settings import Namespace
|
|
|
|
namespace = Namespace(name='document_parsing', label=_('Document parsing'))
|
|
|
|
setting_auto_parsing = namespace.add_setting(
|
|
global_name='DOCUMENT_PARSING_AUTO_PARSING', default=True,
|
|
help_text=_(
|
|
'Set new document types to perform parsing automatically by default.'
|
|
)
|
|
)
|
|
setting_pdftotext_path = namespace.add_setting(
|
|
global_name='DOCUMENT_PARSING_PDFTOTEXT_PATH',
|
|
default='/usr/bin/pdftotext',
|
|
help_text=_(
|
|
'File path to poppler\'s pdftotext program used to extract text '
|
|
'from PDF files.'
|
|
),
|
|
is_path=True
|
|
)
|