Changes between Version 23 and Version 24 of DeveloperGuidelinesS3Framework
- Timestamp:
- 05/26/09 22:08:28 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelinesS3Framework
v23 v24 23 23 # Current Module (for sidebar title) 24 24 module_name = db(db.module.name==module).select()[0].name_nice 25 # List Options (from which to build Menu for this Module) 26 options = db(db['%s_menu_option' % module].enabled=='Yes').select(db['%s_menu_option' % module].ALL, orderby=db['%s_menu_option' % module].priority) 25 # Options Menu (available in all Functions' Views) 26 response.menu_options = [ 27 [T('Home'), False, URL(r=request, f='index')], 28 [T('Add Person'), False, URL(r=request, f='person', args='create')], 29 [T('List People'), False, URL(r=request, f='person')], 30 [T('Search People'), False, URL(r=request, f='person', args='search')] 31 ] 27 32 }}} 28 33 29 Each function needs to return th ese valuesto the view:30 return dict(module_name=module_name , options=options)34 Each function needs to return this value to the view: 35 return dict(module_name=module_name) 31 36 32 37 All tables which are user-editable need to be protected for conflict resolution & synchronization using the predefined fields {{{timestamp}}} & {{{uuidstamp}}}.[[BR]] 33 These are defined in {{{models/ __db.py}}}:38 These are defined in {{{models/00_db.py}}}: 34 39 {{{ 35 40 # Reusable timestamp fields