wiki:DeveloperGuidelines/Templates

Version 7 (modified by Fran Boon, 12 years ago) ( diff )

Move out Themes

Templates

Introduction

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.

Design

Configuration is done using these files:

  • /private/templates/000_config.py
  • /private/templates/default/config.py
  • /private/templates/<template>/config.py

During 1st_run, 000_config.py is copied to models/

000_config.py includes:

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

Prepopulate Data

Prepopulate options are defined in the template's config.py (but can be overridden in the running 000_config.py):

Theme

DeveloperGuidelines/Themes

ToDo

  • controllers/default.py index()
    • Make a controller which can create arbitrary pages based on args &/or vars
  • modules/eden/layouts.py & modules/eden/menus.py

References


DeveloperGuidelines

Note: See TracWiki for help on using the wiki.