-
Notifications
You must be signed in to change notification settings - Fork 12
config.py format
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
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
####description
The description key is supposed to have a string value, that will be the value of the @brief field of the auto-generated doxygen documentation added to the controller, if not present, the @brief field will be set to "TODO add a description"
example:
'controllers' : {
'Articles' : {
'description' : 'Controllers that will centralize all the actions related to the wiki's articles'
},
'Users' : {},
},
#etc.####methods
####forms
####actions_only
###models
###models_controllers