Changes between Version 23 and Version 24 of DeveloperGuidelinesS3Framework


Ignore:
Timestamp:
05/26/09 22:08:28 (13 years ago)
Author:
Fran Boon
Comment:

00_db.py, Menu defined in Controller

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelinesS3Framework

    v23 v24  
    2323# Current Module (for sidebar title)
    2424module_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)
     26response.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]
    2732}}}
    2833
    29 Each function needs to return these values to the view:
    30   return dict(module_name=module_name, options=options)
     34Each function needs to return this value to the view:
     35  return dict(module_name=module_name)
    3136
    3237All 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}}}:
     38These are defined in {{{models/00_db.py}}}:
    3439{{{
    3540# Reusable timestamp fields