Discussion:
[Mayan EDMS: 2477] Modifying local.py doesn't works
Junior Vidotti
2018-05-27 23:47:10 UTC
Permalink
Hi guys,

I just installed Mayan and sniffed around and tried to modify some
settings. I am using a Docker (versions-next), wich settings is stored
at /var/lib/mayan/settings. When I modify local.py adding some settings:

DOCUMENTS_LANGUAGE = 'por'
DOCUMENTS_RECENT_COUNT = 60

When I restart the docker container, nothing changes! What am I doing wrong?

Thanks is advance,

Junior Vidotti
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Junior Vidotti
2018-05-30 17:11:44 UTC
Permalink
Anyone??
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Roberto Rosario
2018-05-30 17:28:26 UTC
Permalink
The version/next branch has many changes regarding configuration of
operation. We've pushed a lot of work to allow changing settings on Mayan
with little or no modification to the local.py file. Just prepend MAYAN_ to
the setting name and pass it as an environment variable in the Docker
command line or your Docker .environment file.

MAYAN_DOCUMENTS_LANGUAGE=por
MAYAN_DOCUMENTS_RECENT_COUNT=60

The branch also changes how setting files are found and imported. In the
past only the local.py file is search and imported. This file also existed
inside the Mayan installation folder. This causes two problems: Only one
configuration file was allowed and if users wanted more than one file they
need to do sequencial imports (this is how the docker_settings.py file
works), it also meant having a writable inside the repository and inside
the installation folder. Django doens't make this easy so we've been
experimenting with moving all user files and installation artifacts outside
of the source folders. What we've done is put a settings folder inside the
media folder that support imports. Create a valid .py file that imports
from "mayan.settings.production import *" and pass the file name as the
MAYAN_SETTINGS_FILE environement variable. Mayan will import this file
before starting up. The default is to import mayan.settings.production. If
you create a file "/var/lib/mayan/settings/mysettings.py" then the value
should be MAYAN_SETTINGS_FILE=mysettings (without the path or extension).

https://gitlab.com/mayan-edms/mayan-edms/blob/versions/next/docker/entrypoint.sh#L19

There are namespace issues with this and we are still trying to resolve
them therefore the final shape of this feature might change before the
final release.
Post by Junior Vidotti
Hi guys,
I just installed Mayan and sniffed around and tried to modify some
settings. I am using a Docker (versions-next), wich settings is stored
DOCUMENTS_LANGUAGE = 'por'
DOCUMENTS_RECENT_COUNT = 60
When I restart the docker container, nothing changes! What am I doing wrong?
Thanks is advance,
Junior Vidotti
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...