[Mayan EDMS: 2477] Modifying local.py doesn't works

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2477] Modifying local.py doesn't works

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 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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2479] Modifying local.py doesn't works

Junior Vidotti
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2480] Re: Modifying local.py doesn't works

rosarior
Administrator
In reply to this post by Junior Vidotti
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. 

On Sunday, May 27, 2018 at 7:47:10 PM UTC-4, Junior Vidotti wrote:
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.