def api(): """ this is example of API with access control WEB2PY provides Hypermedia API (Collection+JSON) Experimental """ from gluon.contrib.hypermedia import Collection rules = {'<tablename>': {'GET': {}, 'POST': {}, 'PUT': {}, 'DELETE': {}}} return Collection(db).process(request, response, rules)
def api(): """ <<<<<<< HEAD:applications/sis2py/controllers/default.py http://..../[app]/default/data/tables http://..../[app]/default/data/create/[table] http://..../[app]/default/data/read/[table]/[id] http://..../[app]/default/data/update/[table]/[id] http://..../[app]/default/data/delete/[table]/[id[ http://..../[app]/default/data/select/[table] http://..../[app]/default/data/search/[table] but URLs bust be signed, i.e. linked with A('table',_href=URL('data/tables',user_signature=True)) or with the signed load operator LOAD('default','data.load',args='tables',ajax=True,user_signature=True) ======= this is example of API with access control WEB2PY provides Hypermedia API (Collection+JSON) Experimental >>>>>>> a1524d4da46ff851429a1de2022d852f8f2c8e53:applications/welcome/controllers/default.py """ from gluon.contrib.hypermedia import Collection rules = { '<tablename>': {'GET':{},'POST':{},'PUT':{},'DELETE':{}}, } return Collection(db).process(request,response,rules)
def api(): from gluon.contrib.hypermedia import Collection rules = { '<tablename>': {'GET':{},'POST':{},'PUT':{},'DELETE':{}}, } return Collection(db).process(request,response,rules)