Changes between Version 10 and Version 11 of DeveloperGuidelines
- Timestamp:
- 12/20/08 06:13:15 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines
v10 v11 42 42 43 43 == T2 == 44 This plugin is used for [wiki:DeveloperGuidelinesAuthenticationAccess AAA] & simplified [wiki: 45 DeveloperGuidelinesCreateReadUpdateDelete CRUD] (inc Conflict Detection) 44 This plugin is used for [wiki:DeveloperGuidelinesAuthenticationAccess AAA] & simplified [wiki:DeveloperGuidelinesCreateReadUpdateDelete CRUD] (inc Conflict Detection) 46 45 * http://mdp.cti.depaul.edu/examples/static/t2.pdf 47 46 We extend the T2 class in {{{modules/sahana.py}}} 47 48 === Conflict Detection === 49 Add this field to each table which needs protecting (in {{{models/db.py}}}): 50 {{{ 51 SQLField('modified_on','datetime'), # Used by T2 to do edit conflict-detection 52 }}} 53 54 == Sahana3 Framework == 55 These are the bits that we use on top of Web2Py to give the Sahana look & feel: 48 56 49 57 Populate the side navigation Menus by adding this to each controller: … … 60 68 Each function needs to return these values to the view: 61 69 return dict(module_name=module_name,modules=modules,options=options) 70 62 71 63 72 List output can be made more functional by adding this to your table definitions in models/db.py: … … 80 89 81 90 Help for a form field can be set using: 82 {{{A(SPAN("[Help]"),_class="popupLink",_id="tooltip",_title=T("Help|This is what this field is for."))}}} 83 84 85 === Conflict Detection === 86 Add this field to each table which needs protecting (in {{{models/db.py}}}): 87 {{{ 88 SQLField('modified_on','datetime'), # Used by T2 to do edit conflict-detection 89 }}} 90 91 DeveloperGuidelinesNewModule 91 {{{A(SPAN("[Help]"),_class="popupLink",_id="tooltip",_title=T("Help Title|This is what this field is for."))}}} 92 92 93 93 === Options fields === … … 95 95 Sahana3 uses a separate table for each lookup list 96 96 97 == How to add a new Module? == 98 DeveloperGuidelinesNewModule 99 97 100 DeveloperGuidelinesAdvanced