New default values for settings
New default value for setting DOCUMENTS_HASH_BLOCK_SIZE is 65535. New default value for setting MIMETYPE_FILE_READ_SIZE is 1024. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -28,6 +28,11 @@
|
||||
safe_dump to load and dump using the SafeLoader.
|
||||
* Add SilenceLoggerTestCaseMixin to lower level of loggers
|
||||
during tests.
|
||||
* New default value for setting DOCUMENTS_HASH_BLOCK_SIZE is
|
||||
65535.
|
||||
* New default value for setting MIMETYPE_FILE_READ_SIZE is
|
||||
1024.
|
||||
|
||||
|
||||
3.1.11 (2019-04-XX)
|
||||
===================
|
||||
|
||||
@@ -22,7 +22,6 @@ Existing config.yml files need to be updated manually.
|
||||
|
||||
Permissions
|
||||
^^^^^^^^^^^
|
||||
|
||||
The role permission grant and revoke permissions were removed. Instead only the
|
||||
role edit permission is required to grant or revoke permissions to a role.
|
||||
|
||||
@@ -35,6 +34,11 @@ Move the development URL definitions for Rosetta and Debug toolbar
|
||||
to a separate URL file. Convert the single urls.py to a module to
|
||||
allow multiple URL files to be used.
|
||||
|
||||
Settings
|
||||
^^^^^^^^
|
||||
|
||||
New default value for setting DOCUMENTS_HASH_BLOCK_SIZE is 65535.
|
||||
New default value for setting MIMETYPE_FILE_READ_SIZE is 1024.
|
||||
|
||||
Other changes
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
@@ -9,6 +9,7 @@ CHECK_TRASH_PERIOD_INTERVAL = 60
|
||||
DELETE_STALE_STUBS_INTERVAL = 60 * 10 # 10 minutes
|
||||
DEFAULT_DELETE_PERIOD = 30
|
||||
DEFAULT_DELETE_TIME_UNIT = TIME_DELTA_UNIT_DAYS
|
||||
DEFAULT_DOCUMENTS_HASH_BLOCK_SIZE = 65535
|
||||
DEFAULT_LANGUAGE = 'eng'
|
||||
DEFAULT_LANGUAGE_CODES = (
|
||||
'ilo', 'run', 'uig', 'hin', 'pan', 'pnb', 'wuu', 'msa', 'kxd', 'ind',
|
||||
|
||||
@@ -7,7 +7,9 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from mayan.apps.smart_settings import Namespace
|
||||
|
||||
from .literals import DEFAULT_LANGUAGE, DEFAULT_LANGUAGE_CODES
|
||||
from .literals import (
|
||||
DEFAULT_DOCUMENTS_HASH_BLOCK_SIZE, DEFAULT_LANGUAGE, DEFAULT_LANGUAGE_CODES
|
||||
)
|
||||
|
||||
namespace = Namespace(name='documents', label=_('Documents'))
|
||||
|
||||
@@ -63,8 +65,8 @@ setting_fix_orientation = namespace.add_setting(
|
||||
)
|
||||
)
|
||||
setting_hash_block_size = namespace.add_setting(
|
||||
global_name='DOCUMENTS_HASH_BLOCK_SIZE', default=0,
|
||||
help_text=_(
|
||||
global_name='DOCUMENTS_HASH_BLOCK_SIZE',
|
||||
default=DEFAULT_DOCUMENTS_HASH_BLOCK_SIZE, help_text=_(
|
||||
'Size of blocks to use when calculating the document file\'s '
|
||||
'checksum. A value of 0 disables the block calculation and the entire '
|
||||
'file will be loaded into memory.'
|
||||
|
||||
3
mayan/apps/mimetype/literals.py
Normal file
3
mayan/apps/mimetype/literals.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
DEFAULT_MIMETYPE_FILE_READ_SIZE = 1024
|
||||
@@ -4,10 +4,13 @@ from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from mayan.apps.smart_settings import Namespace
|
||||
|
||||
from .literals import DEFAULT_MIMETYPE_FILE_READ_SIZE
|
||||
|
||||
namespace = Namespace(label=_('MIME type'), name='mimetype')
|
||||
|
||||
setting_file_read_size = namespace.add_setting(
|
||||
default=0, global_name='MIMETYPE_FILE_READ_SIZE', help_text=_(
|
||||
default=DEFAULT_MIMETYPE_FILE_READ_SIZE,
|
||||
global_name='MIMETYPE_FILE_READ_SIZE', help_text=_(
|
||||
'Amount of bytes to read from a document to determine its MIME type. '
|
||||
'Setting it to 0 disables the feature and attempts to read the entire '
|
||||
'document file into memory.'
|
||||
|
||||
Reference in New Issue
Block a user