def budget():
 def prep(r):
  if ((r.method == 'timeplot') and (r.get_vars.get('component') == 'allocation')):
   query = (FS('allocation.start_date') != None)
   r.resource.add_component_filter('allocation', query)
  return True
 s3.prep = prep
 return s3_rest_controller(rheader=s3db.budget_rheader)

def budget ( ) : def prep ( r ) : if ( ( r . method == 'timeplot' ) and ( r . get_vars . get ( 'component' ) == 'allocation' ) ) : query = ( FS ( 'allocation.start_date' ) != None ) r . resource . add_component_filter ( 'allocation' , query ) return True s3 . prep = prep return s3_rest_controller ( rheader = s3db . budget_rheader )
restful crud controller .