[[TOC]] = WEB SETUP IMPLEMENTATION (Detail)= == '''MODULES''''''' === Layout.py === ==== Def setting(): ==== These will be imported into the models so will run before the models and for the first time only The settings layout needs to be stored in here. The settings is a dict with keys as the: “categary”.”field_id” Like:- {{{ #!python Settings = {"databse.db_type" : {"nice_name" :T("Database"), "description":T("Database Type: "), "input_type":"select", "options":['sqlite', 'sql', 'mysql'], "jquery_validation_requirements”: "required lettersonly" }, #and similarly other options for language can be set } }}} These are really useful for views as this provide the information regarding input type, the value to select from, the field name and the validation requirement. These layouts are mostly for the views. Some of these like port will also contain a validation field for the range of accepted values. We will have to set the settings in accordance with modules/s3/s3cfg.py. ==== Def modules() : ==== These needs to store the names of the modules:- {{{ #!python modules = { "default":True, "admin":True, "gis":True, } #true meaning "on" }}} Here the “on” indicate that the default value of the module status is on. In the modules the layout is not required, as they are stored when we run the modified form of 000_config in the models. The input types of these (name, Description, Access level) are quite fixed so they need not to be stored separately. Therefore not much help is required for the views to.