资 源 简 介
A simple javascript client for web2py apps
plugin_clientapi is a multi-purpose client interface for handling web2py services from client frameworks or any javascript client software.
It supports remote database queries, full database scheme and form retrieval, submission and validation with Ajax.
It takes advantage of web2py data serialization api to perform client-server data comunications in a simple and efficient way.
Examples
Retrieving and submitting a form without user intervention requires a few lines:
w2pClientAPI.onNewForm = function(){ w2pClientAPI.form.vars.runny = "very"; w2pClientAPI.submit();}w2pClientAPI.newForm("db", "cheese");
Retrieving data is also simple
w2pClientAPI.query("db", {"first": {"tablename": "cheese", "fieldname": "id"},