You can set which template Sahana Eden uses in /models/ with the line:

settings.base.template = "default"

Templates allow selecting alternate configuration sets.

This allows a separation between Core Code & Settings/Custom Code.

This helps prevent merge conflicts between different deployment branches & hence reduces the risk of forking.


See the current templates in Sahana Eden:

The skeleton template is designed to be copied & renamed to create new templates.


Configuration is done using these files:

  • /modules/templates/
  • /modules/templates/default/
  • /modules/templates/<template>/

During the 1st run, is copied to models/ includes:

  • machine-specific configuration (Debug, Database, SMTP, API Keys, etc)
  • a setting to define which template folder to run
  • importing of settings from /modules/templates/<template>/
  • optional local overrides to the template's settings

Prepopulate Data

An empty database isn't terribly useful - e.g. maps won't display at all.

Options for how to Prepopulate the database are defined in the template's (but can be overridden in the running

If you need to tweak your menus of build completely new ones:


It is possible to develop a custom theme for the look & feel of your system:

Custom Pages

If you wish to add a new custom page without creating a new module:

Cascading Templates

If you wish to inherit the functionality from another template & then make tweaks, you can do this by cascading templates:


def config(settings):
    from templates.OTHER_TEMPLATE.config import config as OTHER_config
    settings.base.system_name = T("Other System Name")
    settings.base.system_name_short = T("Other Short System name")


# Pull a page from another template
from templates.OTHER_TEMPLATE.controllers import other_page
# (This coukld be subclassed if-desired)

# Define your own homepage:
class index():


from templates.OTHER_TEMPLATE.menus import S3OptionsMenu as OTHEROptionsMenu
class S3OptionsMenu(OTHEROptionsMenu):
    # Override those side menus which are specific.



Last modified 6 years ago Last modified on 01/08/18 12:43:57
Note: See TracWiki for help on using the wiki.