Settings¶
I settings di default vengono presi dal modulo ‘settings’ all’interno. È
compito di una funzione apposita chiamata dall’__init__
di ogni modulo
di aggiungere questi default ai settings di django se non è stato già
definito. Questo viene gestito direttamente dallo starter jmb-start
Default settings¶
All default setting must be set in a module called ‘settings’ inside the
application. Application’s __init__.py
must contain the lines:
from jmb.core.conf import inject_app_defaults
inject_app_defaults(__name__)
So that all variables (UPPER CASE ONLY) get copied to settings singleton.
- NOTE: in order to make this all work the module must not have been imported
- before the settings module. This means we should put
tsettings
out of the module to be sure it will work for applications
jmb.core settings¶
In aggiunta ci sono alcuni settings specifici di jmb.core
:
RUNNING_DEVSERVER: | |
---|---|
usato nella patch Errors in forms. |