def scenario():
 s3db.configure('scenario_config', deletable=False)
 def prep(r):
  if (r.interactive and r.component):
   if (r.component.name != 'config'):
    s3.crud.submit_button = T('Assign')
    s3.crud_labels['DELETE'] = T('Remove')
  if (r.component_name == 'site'):
   field = db.scenario_site.site_id
   field.readable = field.writable = True
  return True
 s3.prep = prep
 output = s3_rest_controller(rheader=s3db.scenario_rheader)
 return output

def scenario ( ) : s3db . configure ( 'scenario_config' , deletable = False ) def prep ( r ) : if ( r . interactive and r . component ) : if ( r . component . name != 'config' ) : s3 . crud . submit_button = T ( 'Assign' ) s3 . crud_labels [ 'DELETE' ] = T ( 'Remove' ) if ( r . component_name == 'site' ) : field = db . scenario_site . site_id field . readable = field . writable = True return True s3 . prep = prep output = s3_rest_controller ( rheader = s3db . scenario_rheader ) return output
restful crud controller .