Skip to content
allan-simon edited this page Nov 19, 2012 · 8 revisions

Format use by config.py

This file is used to generate the first code of your website, and will also format the templates for the code you'll add after using the others tools

The file is organized as 2 python dict:

  • ARCHITECTURE
  • REPLACEMENTS

Architecture

The architecture dict will precise which controllers/models, and the associated views/contents to generate, and also which models use each controllers

the 3 main sections of the dict are the following (each sections will be detailled one by one after)

ARCHITECTURE = {
   'controllers' : {  },
   'models' : { } .
   'models_controllers' :  [ ]
}

for each sections you can consult their usage here ###controllers

Each key of the dict "controllers" will be the name of one controller it should be in Pascal case for example

ARCHITECTURE = { 'controllers' : { 'Articles' : {}, 'Users' : {} }, 'models' : { } . 'models_controllers' : [ ] }

Will generate two empty controllers, **Users** and **Articles** that will be linked to your main application

The value of this controller is an other dictionnary, which can have the following keys 

  * description
  * methods
  * forms
  * actions_only 

####descriptions 

####methods

####forms 

####actions_only 
  

###models 

###models_controllers 



Clone this wiki locally