Hi Yarko,
On Nov 26, 6:45 pm, Yarko <
yark...@gmail.com> wrote:
> Could you write this up? Some (me?!) might find it interesting / useful.
Sure! Here's an example:
This is your controller, say "test.py"
################################################################################################
def deleteWidgets(containerId):
'''
Deletes all widgets inside the given container
'''
db(db.widget.container_id == containerId).delete()
################################################################################################
def xmlrpcHandler():
'''
Exposes XML-RPC functions for this controller
'''
return response.xmlrpc(request, [deleteWidgets])
First run your web2py server, then from the Python command line, type
in these lines to delete all Widgets in Container 12:
import xmlrpclib
rpc = xmlrpclib.ServerProxy('
http://mydomain/myapp/test/
xmlrpcHandler')
rpc.deleteWidgets(12)
If you find that useful, let me know and I'll try writing up an
AlterEgo page
--Jonathan