Changes between Version 58 and Version 59 of DeveloperGuidelinesNewModule
- Timestamp:
- 11/29/13 22:19:11 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelinesNewModule
v58 v59 103 103 Create a file: {{{/controllers/<MODULE NAME>.py}}} 104 104 105 Add CRUD functions for your tables: 105 Add controller functions for your resources, and an index() function for your controller's landing page: 106 106 107 {{{ 107 108 module = request.controller 108 109 110 def index(): 111 """ Module Home Page """ 112 113 module_name = settings.modules[module].name_nice 114 response.title = module_name 115 116 return dict(module_name=module_name) 117 109 118 def vehicle(): 110 "RESTful CRUD controller" 119 """ RESTful CRUD controller """ 120 111 121 resource = request.function 112 122 return s3_rest_controller(module, resource)