def site_needs():
 def prep(r):
  if (r.interactive and (r.method == 'create')):
   site_id = get_vars.get('~.(site)', None)
   if site_id:
    field = s3db.req_site_needs.site_id
    field.default = site_id
    field.readable = False
    field.writable = False
  return True
 s3.prep = prep
 return s3_rest_controller()

def site_needs ( ) : def prep ( r ) : if ( r . interactive and ( r . method == 'create' ) ) : site_id = get_vars . get ( '~.(site)' , None ) if site_id : field = s3db . req_site_needs . site_id field . default = site_id field . readable = False field . writable = False return True s3 . prep = prep return s3_rest_controller ( )
restful crud controller for site needs .