- trouble with external methods
(i apologize in advance for attaching code, particularly *this* code...) i'm having trouble with external methods. i have an "index_html" document in zope that looks like this: ----- <form action="ctl_addSite"> <input name="name"><P> <input name="url"><P> <input type="submit"> </form> ----- and an external method "addSite" from this file: ----- from dbConnection import dbConnection from control import control def addSite(self, name, url): d = dbConnection() c = control(d) c.installWebsite(name, [url]) return '<html><body>done! added %s with url=%s</body></html>' % (name, url) ----- now, when i fill out the form in "index_html" and hit "submit", i get the following: ----- Sorry, an error occurred. Traceback (innermost last): File /home/brian/temp/build/tmp_build/Zope-1.9.0-linux2-x86/lib/python/ZPublisher /Publish.py, line 879, in publish_module File /home/brian/temp/build/tmp_build/Zope-1.9.0-linux2-x86/lib/python/ZPublisher /Publish.py, line 595, in publish (Info: /webctl/ctl_addSite) File /home/brian/temp/build/tmp_build/Zope-1.9.0-linux2-x86/lib/python/Products/E xternalMethod/ExternalMethod.py, line 266, in __call__ (Object: Item) (Info: ((<Folder instance at 0x850e9b8>, 'blah', 'blah'), {}, None)) TypeError: read-only buffer, class ----- this happens with "GET"s as well as "POST"s. i sure hope i'm just doing something stupid here.
participants (1)
-
Wolf Logan