27 | | Re-structure config.py so that all settings-assignment are inside a function config(): |
| 27 | Re-structure config.py so that all settings-assignment are inside a function config() (see example below, or check modules/templates/skeleton/config.py). |
| 28 | |
| 29 | Do not assign any members of {{{current}}} to module-global variables (e.g. move "T = current.T" inside the config() function or wherever it is needed). |
| 30 | |
| 31 | Function and class definitions can (should) still be at the module level, not inside the config() function. |
| 32 | |
| 33 | Note that the variable "settings" is passed in as parameter for the config() function - there is no need for {{{settings = current.deployment_settings}}}. However, make sure that other functions in the template which depend on settings are fixed accordingly. |
| 34 | |
| 35 | The config() function returns nothing. |