Update the way settings are loaded. Instead of loading the
entire config file now settings are loaded from the config
file on demand when the cache misses.
Improve the smart settings classes tests and add another test
for the config file loading.
Add support for variable config file path.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Add the file metadata app. This app uses binary wrappers called drivers
to extract properties from the file of documents. The default driver
uses the exiftool to extract the EXIF record from JPEG images.
The exiftool can also extra some properties from other files like
PDFs, office files and sound file.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Upgrade Celery version used from 3.1.26 to 4.1.1. The following
settings have been renamed: CELERY_ALWAYS_EAGER to
CELERY_TASK_ALWAYS_EAGER, BROKER_URL to CELERY_BROKER_URL.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Extract the new smart file caching code from the common app
and convert it into its own new app called file_caching.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Incorporate the external django-autoadmin app as a core app
and convert it into a Mayan app. This change adds the new
settings: "COMMON_AUTOADMIN_EMAIL", "AUTOADMIN_PASSWORD", and
"AUTOADMIN_USERNAME".
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
The HOME_VIEW setting is not a Django setting but a setting from the
common app. Move the HOME_VIEW to the COMMON namespace and rename it
to COMMON_HOME_VIEW.
Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
Instead of inserting the path of the apps into the Python app,
the apps are now referenced by their full import path.
This app name claves 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>
The settings/base.py file is expeting a dictionary of configuration
options. If there is no config.yml, return and empty dictionary
instead of a None result.
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 mentions of MIDDLEWARE_CLASSES to MIDDLEWARE in the
development and testing settings.
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>