Fix the way the form CSS contained in the media attribute
is rendered. This is now an interator and not a single value.
Replace the current method with a for loop.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Add section to outline common pitfalls when installing.
Reference GitLab issue #487.
Update installation instructons to use the setting
MAYAN_DATABASES instead of the old MAYAN_DATABASE_*.
Unify the installation instructions by converting the
chapters into partials that are now included in the
topic file.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Increase the default value of the index mirroring cache timeout
from 10 seconds to 5 minutes. Since version 3.1.5, mirror
cache invalidation is tied to index updates. This makes the
timeout less relevant. The purpose of the cache timeout is
now avoid runaway memory usage.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Add support for subfolder scanning to watch folders. Closes
GitLab issue #498.
This commit adds a new field to watch folders called
"include_subdirectories".
The directory walk was also updated to use pathlib2.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Add support to the mailing profiles for specifying a "from"
address. Closes GitLab issue #522.
This commit adds a new backend class property "class_fields"
which differs from the normal "fields" property. The "class_fields"
property specifies which of the backend fields will be used to
initialize a backend's driver class. This is to avoid passing
fields that the driver doesn't expect and getting an error.
When sending emails, the "send" method will attempt to get
a "from" key from the backend data and use that when sending
emails. If no "from" key is found a None is passes. Django's
behavior in this situation dictates that the "from" value will
then be taken from the DEFAULT_FROM_EMAIL setting.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Delay the usage and initialization of Django settings
by removing their reference from the "save_configuration"
method declaration.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Fix formatting of the versioning section
and turn the list of version examples into a table.
Add further examples for minor and micro releases.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Add two new custom password validators. One ensures
passwords have a minimum number of uppercase letters and the
other ensures passwords have a minimum amount of numbers.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Cleanup the Sphinx configuration file to comply with PEP8.
Enable the viewcode and autodoc extensions to start adding
code snippets in code.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Revert how the OCR and document parsing generators end
their iteration. Originally they issue an empty return,
then a blank yield was added. This commit reverts the
blank yield and restores the original 'return' behavior.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Add the 'content' attribute to documents to allow access
to a document's parsed content for indexing and other purposes.
Fixes the document parsing indexing failing test.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Add the 'ocr_content' attribute to documents to allow access
to a document's OCR content for indexing and other purposes.
Fixes the OCR indexing failing test.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Jinja2 doesn't support the {% empty %} node, instead it uses
the {% else %} node for the same purpose.
Fixed the tag indexing failing test.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Settings with lazy values are now more carefully checked
and converteed before serializing them.
Previously only the entire value was checked to see if it
was a promise. Now the value is checked to see if it is a
list or tuple and its members checked to see if they are
promises.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Expose new Django settings via the UI: AUTH_PASSWORD_VALIDATORS,
DEBUG, DEFAULT_FROM_EMAIL, INTERNAL_IPS, LANGUAGES,
LANGUAGE_CODE, STATIC_URL, STATICFILES_STORAGE,
TIME_ZONE, WSGI_APPLICATION.
Expose a new Celery setting via the UI: CELERY_ALWAYS_EAGER.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Refactor the initial environment settings and configuration file loading
fixing some issues loading Django settings.
Consolidate all database settings into a new single setting
called "DATABASES". This mirrors Django database setting
structure. This changes makes it possible to use configure
multiple databases and database routers from the environment
variables or configuration file.
Remove usage of django-environ. Only a small set of the
features provided by django-environ were being used.
Variable typecasting is now only YAML. YAML parsing
is implemented in code.
Previously the initial setting code added all settings
it found into the global symbol table. Now the settings
found are matched to a explicit list of allowed settings.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Update the default values of the settings which pass
arguments to backends to be valid Python values and not
YAML strings.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Change the CONVERTER_GRAPHICS_BACKEND_CONFIG settings
to CONVERTER_GRAPHICS_BACKEND_ARGUMENTS for uniformity
and to convey it real purpose which is initializing a backend.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Currently the link to navigate back to the settings
namespace is registered as an action when it is a link.
This commits changes it to a link in the facet menu.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Instead of passing strings as arguments to backends, all settings must
be formatted according to YAML specifications. This is to remove the
need to add separate YAML parsing to each backend argument in each
app that needs it. Argument passing to backends is not fully
uniform.
Users need to update their config files.
Example:
DOCUMENTS_STORAGE_BACKEND_ARGUMENTS: '{location: /home/rosarior/development/mayan-edms/mayan/media/document_storage}'
must be changed to:
DOCUMENTS_STORAGE_BACKEND_ARGUMENTS:
location: /home/rosarior/development/mayan-edms/mayan/media/document_storage
Example 2:
CONVERTER_GRAPHICS_BACKEND_CONFIG: ' { libreoffice_path: /usr/bin/libreoffice, pdftoppm_dpi:
300, pdftoppm_format: jpeg, pdftoppm_path: /usr/bin/pdftoppm, pdfinfo_path:
/usr/bin/pdfinfo, pillow_format: JPEG } '
must be changed to:
CONVERTER_GRAPHICS_BACKEND_CONFIG:
libreoffice_path: /usr/bin/libreoffice
pdftoppm_dpi: 300
pdftoppm_format: jpeg
pdftoppm_path: /usr/bin/pdftoppm
pdfinfo_path: /usr/bin/pdfinfo
pillow_format: JPEG
Example 3:
OCR_BACKEND_ARGUMENTS: ''
must be changed to:
OCR_BACKEND_ARGUMENTS: {}
Settings that need to be updated are:
- COMMON_SHARED_STORAGE_ARGUMENTS
- CONVERTER_GRAPHICS_BACKEND_CONFIG
- DOCUMENTS_CACHE_STORAGE_BACKEND_ARGUMENTS
- DOCUMENTS_STORAGE_BACKEND_ARGUMENTS
- OCR_BACKEND_ARGUMENTS
- SIGNATURES_STORAGE_BACKEND_ARGUMENTS
- SOURCES_STAGING_FILE_CACHE_STORAGE_BACKEND_ARGUMENTS
The following error will appear in the console if a setting is not yet
updated to this new format::
TypeError: type object argument after ** must be a mapping, not str
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Update mentions of MIDDLEWARE_CLASSES to MIDDLEWARE in the
development and testing settings.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Use Jinja2 to render the templates of the indexing,
workflows, smart links, user mailer and metadata apps.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Adds JavaScript support to monitor keypresses or mouse events
of forms with the classes .form-hotkey-enter or form-hotkey-double-click,
and trigger the click event of the button with the CSS class
.btn-hotkey-default.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Make the custom middleware provided by Mayan to use the
MiddlewareMixin provide by Django. This make the middleware
classes behave like classes or callables. This change ensures
compatibility with Django 2.x.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
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.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
Add support to pass serialized transformation lists to the
document page generation task.
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>