Hi Yarko,
On Nov 26, 6:45 pm, Yarko <[EMAIL PROTECTED]> 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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---