def open_tasks_for_project():
 def prep(r):
  tablename = 'project_project'
  s3.crud_strings[tablename].title_list = T('Open Tasks for Project')
  s3.crud_labels.READ = s3.crud_labels.UPDATE = T('Select')
  s3db.configure(tablename, deletable=False, listadd=False)
  return True
 s3.prep = prep
 def postp(r, output):
  if (r.interactive and (not r.component)):
   tasklist_url = URL(f='task', vars={'project': '[id]'})
   s3_action_buttons(r, deletable=False, read_url=tasklist_url, update_url=tasklist_url)
  return output
 s3.postp = postp
 return s3_rest_controller(module, 'project', hide_filter=False)

def open_tasks_for_project ( ) : def prep ( r ) : tablename = 'project_project' s3 . crud_strings [ tablename ] . title_list = T ( 'Open Tasks for Project' ) s3 . crud_labels . READ = s3 . crud_labels . UPDATE = T ( 'Select' ) s3db . configure ( tablename , deletable = False , listadd = False ) return True s3 . prep = prep def postp ( r , output ) : if ( r . interactive and ( not r . component ) ) : tasklist_url = URL ( f = 'task' , vars = { 'project' : '[id]' } ) s3_action_buttons ( r , deletable = False , read_url = tasklist_url , update_url = tasklist_url ) return output s3 . postp = postp return s3_rest_controller ( module , 'project' , hide_filter = False )
simplified controller to select a project and open the list of open tasks for it .