from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace namespace = Namespace(label=_('Search'), name='search') setting_disable_simple_search = namespace.add_setting( global_name='SEARCH_DISABLE_SIMPLE_SEARCH', default=False, help_text=_( 'Disables the single term bar search leaving only the advanced ' 'search button.'))
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .literals import ( DEFAULT_DOCUMENT_BODY_TEMPLATE, DEFAULT_DOCUMENT_SUBJECT_TEMPLATE, DEFAULT_LINK_BODY_TEMPLATE, DEFAULT_LINK_SUBJECT_TEMPLATE ) namespace = Namespace(label=_('Mailing'), name='mailer') setting_document_subject_template = namespace.add_setting( default=DEFAULT_DOCUMENT_SUBJECT_TEMPLATE, help_text=_('Template for the document email form subject line.'), global_name='MAILER_DOCUMENT_SUBJECT_TEMPLATE' ) setting_document_body_template = namespace.add_setting( default=DEFAULT_DOCUMENT_BODY_TEMPLATE, help_text=_('Template for the document email form body text. Can include HTML.'), global_name='MAILER_DOCUMENT_BODY_TEMPLATE' ) setting_link_subject_template = namespace.add_setting( default=DEFAULT_LINK_SUBJECT_TEMPLATE, help_text=_('Template for the document link email form subject line.'), global_name='MAILER_LINK_SUBJECT_TEMPLATE' ) setting_link_body_template = namespace.add_setting( default=DEFAULT_LINK_BODY_TEMPLATE, help_text=_('Template for the document link email form body text. Can include HTML.'),
import os from django.conf import settings from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .setting_migrations import DocumentSignaturesSettingMigration namespace = Namespace(label=_('Document signatures'), migration_class=DocumentSignaturesSettingMigration, name='signatures', version='0002') setting_storage_backend = namespace.add_setting( default='django.core.files.storage.FileSystemStorage', global_name='SIGNATURES_STORAGE_BACKEND', help_text=_('Path to the Storage subclass to use when storing detached ' 'signatures.')) setting_storage_backend_arguments = namespace.add_setting( global_name='SIGNATURES_STORAGE_BACKEND_ARGUMENTS', default={ 'location': os.path.join(settings.MEDIA_ROOT, 'document_signatures') }, help_text=_('Arguments to pass to the SIGNATURE_STORAGE_BACKEND. '))
from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace namespace = Namespace(label=_('Mirroring'), name='mirroring') setting_document_lookup_cache_timeout = namespace.add_setting( global_name='MIRRORING_DOCUMENT_CACHE_LOOKUP_TIMEOUT', default=10, help_text=_('Time in seconds to cache the path lookup to a document.'), ) setting_node_lookup_cache_timeout = namespace.add_setting( global_name='MIRRORING_NODE_CACHE_LOOKUP_TIMEOUT', default=10, help_text=_('Time in seconds to cache the path lookup to an index node.'), )
from django.conf import settings from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .literals import (DEFAULT_GRAPHVIZ_DOT_PATH, DEFAULT_WORKFLOW_IMAGE_CACHE_MAXIMUM_SIZE) from .setting_callbacks import callback_update_workflow_image_cache_size namespace = Namespace(label=_('Workflows'), name='document_states') setting_graphviz_dot_path = namespace.add_setting( global_name='WORKFLOWS_GRAPHVIZ_DOT_PATH', default=DEFAULT_GRAPHVIZ_DOT_PATH, help_text= _('File path to the graphviz dot program used to generate workflow previews.' ), is_path=True) setting_workflow_image_cache_maximum_size = namespace.add_setting( global_name='WORKFLOWS_IMAGE_CACHE_MAXIMUM_SIZE', default=DEFAULT_WORKFLOW_IMAGE_CACHE_MAXIMUM_SIZE, help_text=_( 'The threshold at which the WORKFLOWS_IMAGE_CACHE_STORAGE_BACKEND will ' 'start deleting the oldest workflow image cache files. Specify the ' 'size in bytes.'), post_edit_function=callback_update_workflow_image_cache_size) settings_workflow_image_cache_time = namespace.add_setting( global_name='WORKFLOWS_IMAGE_CACHE_TIME', default='31556926', help_text=_(
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .literals import DEFAULT_EXIF_PATH namespace = Namespace(label=_('File metadata'), name='file_metadata') setting_auto_process = namespace.add_setting( global_name='FILE_METADATA_AUTO_PROCESS', default=True, help_text=_( 'Set new document types to perform file metadata processing ' 'automatically by default.' ) ) setting_drivers_arguments = namespace.add_setting( default=''' {{ exif_driver: {{exiftool_path: {}}}, }} '''.replace('\n', '').format(DEFAULT_EXIF_PATH), help_text=_( 'Arguments to pass to the drivers.' ), global_name='FILE_METADATA_DRIVERS_ARGUMENTS', quoted=True )
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .literals import DEFAULT_MAXIMUM_TITLE_LENGTH, DEFAULT_MESSAGE_POSITION namespace = Namespace(label=_('Appearance'), name='appearance') setting_max_title_length = namespace.add_setting( default=DEFAULT_MAXIMUM_TITLE_LENGTH, global_name='APPEARANCE_MAXIMUM_TITLE_LENGTH', help_text=_( 'Maximum number of characters that will be displayed as the view ' 'title.')) setting_message_position = namespace.add_setting( default=DEFAULT_MESSAGE_POSITION, global_name='APPEARANCE_MESSAGE_POSITION', help_text=_( 'Position where the system message will be displayed. Options are: ' 'top-left, top-center, top-right, bottom-left, bottom-center, ' 'bottom-right.'))
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .literals import DEFAULT_BACKEND, DEFAULT_LOCK_TIMEOUT_VALUE namespace = Namespace(label=_('Lock manager'), name='lock_manager') setting_backend = namespace.add_setting( default=DEFAULT_BACKEND, global_name='LOCK_MANAGER_BACKEND', help_text=_('Path to the class to use when to request and release ' 'resource locks.')) setting_backend_arguments = namespace.add_setting( global_name='LOCK_MANAGER_BACKEND_ARGUMENTS', default={}, help_text=_('Arguments to pass to the LOCK_MANAGER_BACKEND.')) setting_default_lock_timeout = namespace.add_setting( default=DEFAULT_LOCK_TIMEOUT_VALUE, global_name='LOCK_MANAGER_DEFAULT_LOCK_TIMEOUT', help_text=_('Default amount of time in seconds after which a resource ' 'lock will be automatically released.'))
from .literals import (DEFAULT_DOCUMENTS_CACHE_MAXIMUM_SIZE, DEFAULT_DOCUMENTS_HASH_BLOCK_SIZE, DEFAULT_LANGUAGE, DEFAULT_LANGUAGE_CODES, DEFAULT_STUB_EXPIRATION_INTERVAL) from .setting_callbacks import callback_update_cache_size from .setting_migrations import DocumentsSettingMigration namespace = Namespace(label=_('Documents'), migration_class=DocumentsSettingMigration, name='documents', version='0002') setting_document_cache_maximum_size = namespace.add_setting( global_name='DOCUMENTS_CACHE_MAXIMUM_SIZE', default=DEFAULT_DOCUMENTS_CACHE_MAXIMUM_SIZE, help_text=_( 'The threshold at which the DOCUMENT_CACHE_STORAGE_BACKEND will start ' 'deleting the oldest document image cache files. Specify the size in ' 'bytes.'), post_edit_function=callback_update_cache_size) setting_documentimagecache_storage = namespace.add_setting( global_name='DOCUMENTS_CACHE_STORAGE_BACKEND', default='django.core.files.storage.FileSystemStorage', help_text=_('Path to the Storage subclass to use when storing the cached ' 'document image files.')) setting_documentimagecache_storage_arguments = namespace.add_setting( global_name='DOCUMENTS_CACHE_STORAGE_BACKEND_ARGUMENTS', default={'location': os.path.join(settings.MEDIA_ROOT, 'document_cache')}, help_text=_('Arguments to pass to the DOCUMENT_CACHE_STORAGE_BACKEND.'), ) setting_disable_base_image_cache = namespace.add_setting( global_name='DOCUMENTS_DISABLE_BASE_IMAGE_CACHE',
from __future__ import unicode_literals import tempfile from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace namespace = Namespace(label=_('Storage'), name='storage') setting_temporary_directory = namespace.add_setting( global_name='STORAGE_TEMPORARY_DIRECTORY', default=tempfile.gettempdir(), help_text=_( 'Temporary directory used site wide to store thumbnails, previews ' 'and temporary files.'))
""" This module should be called settings.py but is named conf.py to avoid a clash with the mayan/settings/* module """ from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace namespace = Namespace(name='mayan', label=_('Mayan')) setting_celery_class = namespace.add_setting( help_text=_('The class used to instantiate the main Celery app.'), global_name='MAYAN_CELERY_CLASS', default='celery.Celery')
from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .literals import DEFAULT_LOGIN_METHOD, DEFAULT_MAXIMUM_SESSION_LENGTH namespace = Namespace(label=_('Authentication'), name='authentication') setting_login_method = namespace.add_setting( global_name='AUTHENTICATION_LOGIN_METHOD', default=DEFAULT_LOGIN_METHOD, help_text=_( 'Controls the mechanism used to authenticated user. Options are: ' 'username, email' ) ) setting_maximum_session_length = namespace.add_setting( global_name='AUTHENTICATION_MAXIMUM_SESSION_LENGTH', default=DEFAULT_MAXIMUM_SESSION_LENGTH, help_text=_( 'Maximum time a user clicking the "Remember me" checkbox will ' 'remain logged in. Value is time in seconds.' ) ) setting_disable_password_reset = namespace.add_setting( global_name='AUTHENTICATION_DISABLE_PASSWORD_RESET', default=False, help_text=_( 'Remove the "Forgot your password?" link on the login form used to ' 'trigger the password reset.' ) )
from __future__ import unicode_literals import os from django.conf import settings from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace namespace = Namespace(label=_('Signatures'), name='django_gpg') setting_gpg_home = namespace.add_setting( global_name='SIGNATURES_GPG_HOME', default=os.path.join(settings.MEDIA_ROOT, 'gpg_home'), help_text=_( 'Home directory used to store keys as well as configuration files.' ), is_path=True ) setting_gpg_path = namespace.add_setting( global_name='SIGNATURES_GPG_PATH', default='/usr/bin/gpg1', help_text=_('Path to the GPG binary.'), is_path=True ) setting_keyserver = namespace.add_setting( global_name='SIGNATURES_KEYSERVER', default='pool.sks-keyservers.net', help_text=_('Keyserver used to query for keys.') )
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace namespace = Namespace(label=_('REST API'), name='rest_api', version='0001') setting_disable_links = namespace.add_setting( global_name='REST_API_DISABLE_LINKS', default=False, help_text=_('Disable the REST API links in the tools menu.'), )
from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .literals import DEFAULT_PDFTOTEXT_PATH namespace = Namespace(label=_('Document parsing'), name='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=DEFAULT_PDFTOTEXT_PATH, help_text=_( 'File path to poppler\'s pdftotext program used to extract text ' 'from PDF files.'), is_path=True)
from django.conf import settings from django.utils.translation import ugettext_lazy as _ import mayan from mayan.apps.smart_settings.classes import Namespace from .literals import DEFAULT_COMMON_HOME_VIEW from .setting_migrations import CommonSettingMigration namespace = Namespace(label=_('Common'), migration_class=CommonSettingMigration, name='common', version='0002') setting_auto_logging = namespace.add_setting( global_name='COMMON_AUTO_LOGGING', default=True, help_text=_('Automatically enable logging to all apps.')) settings_db_sync_task_delay = namespace.add_setting( global_name='COMMON_DB_SYNC_TASK_DELAY', default=2, help_text=_( 'Time to delay background tasks that depend on a database commit to ' 'propagate.')) setting_disabled_apps = namespace.add_setting( global_name='COMMON_DISABLED_APPS', default=settings.COMMON_DISABLED_APPS, help_text= _('A list of strings designating all applications that are to be removed ' 'from the list normally installed by Mayan EDMS. Each string should be ' 'a dotted Python path to: an application configuration class (preferred), ' 'or a package containing an application.'),
from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace namespace = Namespace(label=_('Search'), name='search') setting_search_backend = namespace.add_setting( global_name='SEARCH_BACKEND', default='mayan.apps.dynamic_search.backends.django.DjangoSearchBackend', help_text=_('Full path to the backend to be used to handle the search.')) setting_search_backend_arguments = namespace.add_setting( global_name='SEARCH_BACKEND_ARGUMENTS', default={}) setting_disable_simple_search = namespace.add_setting( global_name='SEARCH_DISABLE_SIMPLE_SEARCH', default=False, help_text=_( 'Disables the single term bar search leaving only the advanced ' 'search button.'))
from __future__ import unicode_literals import os from django.conf import settings from django.utils.translation import ugettext_lazy as _ import mayan from mayan.apps.smart_settings.classes import Namespace from .literals import DEFAULT_COMMON_HOME_VIEW namespace = Namespace(label=_('Common'), name='common') setting_auto_logging = namespace.add_setting( global_name='COMMON_AUTO_LOGGING', default=True, help_text=_('Automatically enable logging to all apps.')) settings_db_sync_task_delay = namespace.add_setting( global_name='COMMON_DB_SYNC_TASK_DELAY', default=2, help_text=_( 'Time to delay background tasks that depend on a database commit to ' 'propagate.')) setting_disabled_apps = namespace.add_setting( global_name='COMMON_DISABLED_APPS', default=settings.COMMON_DISABLED_APPS, help_text= _('A list of strings designating all applications that are to be removed ' 'from the list normally installed by Mayan EDMS. Each string should be ' 'a dotted Python path to: an application configuration class (preferred), ' 'or a package containing an application.'),
from mayan.apps.smart_settings.classes import Namespace from .literals import (DEFAULT_CELERY_BROKER_LOGIN_METHOD, DEFAULT_CELERY_BROKER_URL, DEFAULT_CELERY_BROKER_USE_SSL, DEFAULT_CELERY_RESULT_BACKEND) # Don't import anything on star import, we just want to make it easy # for apps.py to activate the settings in this module. __all__ = () namespace = Namespace(label=_('Celery'), name='celery') setting_celery_broker_login_method = namespace.add_setting( global_name='CELERY_BROKER_LOGIN_METHOD', default=DEFAULT_CELERY_BROKER_LOGIN_METHOD, help_text=_('Default: "AMQPLAIN". Set custom amqp login method.'), ) setting_celery_broker_url = namespace.add_setting( global_name='CELERY_BROKER_URL', default=DEFAULT_CELERY_BROKER_URL, help_text=_( 'Default: "amqp://". Default broker URL. This must be a URL in ' 'the form of: transport://userid:password@hostname:port/virtual_host ' 'Only the scheme part (transport://) is required, the rest is ' 'optional, and defaults to the specific transports default values.'), ) setting_celery_broker_use_ssl = namespace.add_setting( global_name='CELERY_BROKER_USE_SSL', default=DEFAULT_CELERY_BROKER_USE_SSL, help_text=_('Default: "Disabled". Toggles SSL usage on broker connection '
from __future__ import unicode_literals import os from django.conf import settings from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace namespace = Namespace(label=_('Sources'), name='sources') setting_scanimage_path = namespace.add_setting( global_name='SOURCES_SCANIMAGE_PATH', default='/usr/bin/scanimage', help_text=_( 'File path to the scanimage program used to control image scanners.'), is_path=True) setting_staging_file_image_cache_storage = namespace.add_setting( global_name='SOURCES_STAGING_FILE_CACHE_STORAGE_BACKEND', default='django.core.files.storage.FileSystemStorage', help_text=_('Path to the Storage subclass to use when storing the cached ' 'staging_file image files.'), quoted=True) setting_staging_file_image_cache_storage_arguments = namespace.add_setting( global_name='SOURCES_STAGING_FILE_CACHE_STORAGE_BACKEND_ARGUMENTS', default='{{location: {}}}'.format( os.path.join(settings.MEDIA_ROOT, 'staging_file_cache')), help_text=_( 'Arguments to pass to the SOURCES_STAGING_FILE_CACHE_STORAGE_BACKEND.' ), quoted=True,
from mayan.apps.smart_settings.classes import Namespace # Don't import anything on start import, we just want to make it easy # for apps.py to activate the settings in this module. __all__ = () namespace = Namespace(label=_('Django'), name='django') setting_django_allowed_hosts = namespace.add_setting( global_name='ALLOWED_HOSTS', default=settings.ALLOWED_HOSTS, help_text=_( 'A list of strings representing the host/domain names that this site ' 'can serve. This is a security measure to prevent HTTP Host header ' 'attacks, which are possible even under many seemingly-safe web ' 'server configurations. Values in this list can be ' 'fully qualified names (e.g. \'www.example.com\'), in which case ' 'they will be matched against the request\'s Host header exactly ' '(case-insensitive, not including port). A value beginning with a ' 'period can be used as a subdomain wildcard: \'.example.com\' will ' 'match example.com, www.example.com, and any other subdomain of ' 'example.com. A value of \'*\' will match anything; in this case you ' 'are responsible to provide your own validation of the Host header ' '(perhaps in a middleware; if so this middleware must be listed ' 'first in MIDDLEWARE).' ), ) setting_django_append_slash = namespace.add_setting( global_name='APPEND_SLASH', default=settings.APPEND_SLASH, help_text=_( 'When set to True, if the request URL does not match any of the ' 'patterns in the URLconf and it doesn\'t end in a slash, an HTTP ' 'redirect is issued to the same URL with a slash appended. Note ' 'that the redirect may cause any data submitted in a POST request '
from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .literals import DEFAULT_EMAIL, DEFAULT_PASSWORD, DEFAULT_USERNAME namespace = Namespace(label=_('Auto administrator'), name='autoadmin') setting_email = namespace.add_setting( global_name='AUTOADMIN_EMAIL', default=DEFAULT_EMAIL, help_text=_( 'Sets the email of the automatically created super user account.' ) ) setting_password = namespace.add_setting( global_name='AUTOADMIN_PASSWORD', default=DEFAULT_PASSWORD, help_text=_( 'The password of the automatically created super user account. ' 'If it is equal to None, the password is randomly generated.' ) ) setting_username = namespace.add_setting( global_name='AUTOADMIN_USERNAME', default=DEFAULT_USERNAME, help_text=_( 'The username of the automatically created super user account.' ) )
from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .setting_migrations import OCRSettingMigration namespace = Namespace(label=_('OCR'), migration_class=OCRSettingMigration, name='ocr', version='0002') setting_ocr_backend = namespace.add_setting( global_name='OCR_BACKEND', default='mayan.apps.ocr.backends.tesseract.Tesseract', help_text=_('Full path to the backend to be used to do OCR.')) setting_ocr_backend_arguments = namespace.add_setting( global_name='OCR_BACKEND_ARGUMENTS', default={}) setting_auto_ocr = namespace.add_setting( global_name='OCR_AUTO_OCR', default=True, help_text=_( 'Set new document types to perform OCR automatically by default.'))
from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .literals import DEFAULT_GPG_PATH namespace = Namespace(label=_('Signatures'), name='django_gpg') setting_gpg_backend = namespace.add_setting( global_name='SIGNATURES_BACKEND', default='mayan.apps.django_gpg.backends.python_gnupg.PythonGNUPGBackend', help_text=_( 'Full path to the backend to be used to handle keys and signatures.')) setting_gpg_backend_arguments = namespace.add_setting( global_name='SIGNATURES_BACKEND_ARGUMENTS', default={ 'gpg_path': DEFAULT_GPG_PATH, }) setting_keyserver = namespace.add_setting( global_name='SIGNATURES_KEYSERVER', default='pool.sks-keyservers.net', help_text=_('Keyserver used to query for keys.'))
from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .literals import (DEFAULT_LIBREOFFICE_PATH, DEFAULT_PDFTOPPM_DPI, DEFAULT_PDFTOPPM_FORMAT, DEFAULT_PDFTOPPM_PATH, DEFAULT_PDFINFO_PATH, DEFAULT_PILLOW_FORMAT) from .setting_migrations import ConvertSettingMigration namespace = Namespace(label=_('Converter'), migration_class=ConvertSettingMigration, name='converter', version='0002') setting_graphics_backend = namespace.add_setting( default='mayan.apps.converter.backends.python.Python', help_text=_('Graphics conversion backend to use.'), global_name='CONVERTER_GRAPHICS_BACKEND', ) setting_graphics_backend_arguments = namespace.add_setting( default={ 'libreoffice_path': DEFAULT_LIBREOFFICE_PATH, 'pdftoppm_dpi': DEFAULT_PDFTOPPM_DPI, 'pdftoppm_format': DEFAULT_PDFTOPPM_FORMAT, 'pdftoppm_path': DEFAULT_PDFTOPPM_PATH, 'pdfinfo_path': DEFAULT_PDFINFO_PATH, 'pillow_format': DEFAULT_PILLOW_FORMAT, }, help_text=_('Configuration options for the graphics conversion backend.'), global_name='CONVERTER_GRAPHICS_BACKEND_ARGUMENTS')
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .literals import DEFAULT_EXIF_PATH from .setting_migrations import FileMetadataSettingMigration namespace = Namespace(label=_('File metadata'), migration_class=FileMetadataSettingMigration, name='file_metadata', version='0002') setting_auto_process = namespace.add_setting( global_name='FILE_METADATA_AUTO_PROCESS', default=True, help_text=_('Set new document types to perform file metadata processing ' 'automatically by default.')) setting_drivers_arguments = namespace.add_setting( default={'exif_driver': { 'exiftool_path': DEFAULT_EXIF_PATH }}, help_text=_('Arguments to pass to the drivers.'), global_name='FILE_METADATA_DRIVERS_ARGUMENTS')
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .literals import DEFAULT_LOGIN_METHOD, DEFAULT_MAXIMUM_SESSION_LENGTH namespace = Namespace(label=_('Authentication'), name='authentication') setting_login_method = namespace.add_setting( global_name='AUTHENTICATION_LOGIN_METHOD', default=DEFAULT_LOGIN_METHOD, help_text=_( 'Controls the mechanism used to authenticated user. Options are: ' 'username, email' ) ) setting_maximum_session_length = namespace.add_setting( global_name='AUTHENTICATION_MAXIMUM_SESSION_LENGTH', default=DEFAULT_MAXIMUM_SESSION_LENGTH, help_text=_( 'Maximum time a user clicking the "Remember me" checkbox will ' 'remain logged in. Value is time in seconds.' ) )
from __future__ import unicode_literals from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .literals import ( DEFAULT_LIBREOFFICE_PATH, DEFAULT_PDFTOPPM_DPI, DEFAULT_PDFTOPPM_FORMAT, DEFAULT_PDFTOPPM_PATH, DEFAULT_PDFINFO_PATH, DEFAULT_PILLOW_FORMAT ) namespace = Namespace(label=_('Converter'), name='converter') setting_graphics_backend = namespace.add_setting( default='mayan.apps.converter.backends.python.Python', help_text=_('Graphics conversion backend to use.'), global_name='CONVERTER_GRAPHICS_BACKEND', ) setting_graphics_backend_config = namespace.add_setting( default=''' {{ libreoffice_path: {}, pdftoppm_dpi: {}, pdftoppm_format: {}, pdftoppm_path: {}, pdfinfo_path: {}, pillow_format: {} }} '''.replace('\n', '').format( DEFAULT_LIBREOFFICE_PATH, DEFAULT_PDFTOPPM_DPI,
from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace # Don't import anything on star import, we just want to make it easy # for apps.py to activate the settings in this module. __all__ = () namespace = Namespace(label=_('Celery'), name='celery') setting_celery_broker_url = namespace.add_setting( global_name='CELERY_BROKER_URL', default=None, help_text=_( 'Default: "amqp://". Default broker URL. This must be a URL in ' 'the form of: transport://userid:password@hostname:port/virtual_host ' 'Only the scheme part (transport://) is required, the rest is ' 'optional, and defaults to the specific transports default values.'), ) setting_celery_result_backend = namespace.add_setting( global_name='CELERY_RESULT_BACKEND', default=None, help_text=_( 'Default: No result backend enabled by default. The backend used ' 'to store task results (tombstones). Refer to ' 'http://docs.celeryproject.org/en/v4.1.0/userguide/configuration.' 'html#result-backend'))
from django.utils.translation import ugettext_lazy as _ from mayan.apps.smart_settings.classes import Namespace from .parsers import MetadataParser from .validators import MetadataValidator namespace = Namespace(label=_('Metadata'), name='metadata') setting_available_validators = namespace.add_setting( global_name='METADATA_AVAILABLE_VALIDATORS', default=MetadataValidator.get_import_paths()) setting_available_parsers = namespace.add_setting( global_name='METADATA_AVAILABLE_PARSERS', default=MetadataParser.get_import_paths())