Changes between Version 1 and Version 2 of DeveloperGuidelines/Templates/Migration


Ignore:
Timestamp:
01/05/15 09:00:48 (7 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Templates/Migration

    v1 v2  
    2525== Refactoring config.py ==
    2626
    27 Re-structure config.py so that all settings-assignment are inside a function config():
     27Re-structure config.py so that all settings-assignment are inside a function config() (see example below, or check modules/templates/skeleton/config.py).
     28
     29Do 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
     31Function and class definitions can (should) still be at the module level, not inside the config() function.
     32
     33Note 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
     35The config() function returns nothing.
    2836
    2937Old config.py:
     
    93101}}}
    94102
    95 Function and class definitions can (should) still be at the module level, not inside the config() function.
    96 
    97 Note that the variable "settings" is passed in as parameter for the config() function - there is no need for {{{settings = current.deployment_settings}}}.
    98 
    99 The config() function returns nothing.
    100 
    101103== Adapt all Paths inside the Template ==
    102104