Renamed setting LOCK_MANAGER_DEFAULT_BACKEND to LOCK_MANAGER_BACKEND. Add help text to settings.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-08-20 02:50:48 -04:00
parent 958f85eb1e
commit dee7dd5429
5 changed files with 46 additions and 14 deletions

View File

@@ -55,6 +55,8 @@
new YAML configuration file support.
- Add new revertsettings management command.
- Add new permission to edit setting via the UI.
- Renamed setting LOCK_MANAGER_DEFAULT_BACKEND to LOCK_MANAGER_BACKEND.
- Add help text to settings.
3.0.1 (2018-07-08)
=================

View File

@@ -8,6 +8,9 @@ from .literals import DEFAULT_MAXIMUM_TITLE_LENGTH
namespace = Namespace(name='appearance', label=_('Appearance'))
setting_max_title_length = namespace.add_setting(
global_name='APPEARANCE_MAXIMUM_TITLE_LENGTH',
default=DEFAULT_MAXIMUM_TITLE_LENGTH
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.'
)
)

View File

@@ -9,12 +9,17 @@ from smart_settings import Namespace
namespace = Namespace(name='signatures', label=_('Document signatures'))
setting_storage_backend = namespace.add_setting(
global_name='SIGNATURES_STORAGE_BACKEND',
default='django.core.files.storage.FileSystemStorage'
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: {}}}'.format(
os.path.join(settings.MEDIA_ROOT, 'document_signatures')
), quoted=True
), quoted=True, help_text=_(
'Arguments to pass to the SIGNATURE_STORAGE_BACKEND. '
)
)

View File

@@ -13,13 +13,18 @@ namespace = Namespace(name='documents', label=_('Documents'))
setting_documentimagecache_storage = namespace.add_setting(
global_name='DOCUMENTS_CACHE_STORAGE_BACKEND',
default='django.core.files.storage.FileSystemStorage', quoted=True
default='django.core.files.storage.FileSystemStorage', help_text=_(
'Path to the Storage subclass to use when storing the cached '
'document image files.'
), quoted=True
)
setting_documentimagecache_storage_arguments = namespace.add_setting(
global_name='DOCUMENTS_CACHE_STORAGE_BACKEND_ARGUMENTS',
default='{{location: {}}}'.format(
os.path.join(settings.MEDIA_ROOT, 'document_cache')
), quoted=True
), help_text=_(
'Arguments to pass to the DOCUMENT_CACHE_STORAGE_BACKEND.'
),quoted=True,
)
setting_disable_base_image_cache = namespace.add_setting(
global_name='DOCUMENTS_DISABLE_BASE_IMAGE_CACHE', default=False,
@@ -60,7 +65,11 @@ setting_language_codes = namespace.add_setting(
help_text=_('List of supported document languages. In ISO639-3 format.')
)
settings_document_page_image_cache_time = namespace.add_setting(
global_name='DOCUMENTS_PAGE_IMAGE_CACHE_TIME', default='31556926'
global_name='DOCUMENTS_PAGE_IMAGE_CACHE_TIME', default='31556926',
help_text=_(
'Time in seconds that the browser should cache the supplied document '
'images. The default of 31559626 seconds corresponde to 1 year.'
)
)
setting_preview_height = namespace.add_setting(
global_name='DOCUMENTS_PREVIEW_HEIGHT', default=''
@@ -89,19 +98,26 @@ setting_rotation_step = namespace.add_setting(
)
setting_storage_backend = namespace.add_setting(
global_name='DOCUMENTS_STORAGE_BACKEND',
default='django.core.files.storage.FileSystemStorage'
default='django.core.files.storage.FileSystemStorage', help_text=_(
'Path to the Storage subclass to use when storing document '
'files.'
)
)
setting_storage_backend_arguments = namespace.add_setting(
global_name='DOCUMENTS_STORAGE_BACKEND_ARGUMENTS',
default='{{location: {}}}'.format(
os.path.join(settings.MEDIA_ROOT, 'document_storage')
)
), help_text=_('Arguments to pass to the DOCUMENT_STORAGE_BACKEND.')
)
setting_thumbnail_height = namespace.add_setting(
global_name='DOCUMENTS_THUMBNAIL_HEIGHT', default=''
global_name='DOCUMENTS_THUMBNAIL_HEIGHT', default='', help_text=_(
'Height in pixels of the document thumbnail image.'
)
)
setting_thumbnail_width = namespace.add_setting(
global_name='DOCUMENTS_THUMBNAIL_WIDTH', default='800'
global_name='DOCUMENTS_THUMBNAIL_WIDTH', default='800', help_text=(
'Width in pixels of the document thumbnail image.'
)
)
setting_zoom_max_level = namespace.add_setting(
global_name='DOCUMENTS_ZOOM_MAX_LEVEL', default=300,

View File

@@ -11,10 +11,16 @@ namespace = Namespace(name='lock_manager', label=_('Lock manager'))
setting_backend = namespace.add_setting(
default=DEFAULT_BACKEND,
global_name='LOCK_MANAGER_DEFAULT_BACKEND',
global_name='LOCK_MANAGER_BACKEND', help_text=_(
'Path to the class to use when to request and release '
'resource locks.'
)
)
setting_default_lock_timeout = namespace.add_setting(
default=DEFAULT_LOCK_TIMEOUT_VALUE,
global_name='LOCK_MANAGER_DEFAULT_LOCK_TIMEOUT',
global_name='LOCK_MANAGER_DEFAULT_LOCK_TIMEOUT', help_text=_(
'Default amount of time in seconds after which a resource '
'lock will be automatically released.'
)
)