Custom Method to edit PythonScript
Hi, I would like create a custom DTML-Method to edit a python-script within Zope. The reason for this is that I would like to be able to control in certain ways so I don't want to use "ZPythonScriptHTML_editForm". The user must not be able to change the whole script but only parts I let him see. Something like the 'manage_edit' object of DTML-Methods is (more or less) what I need. The result would be a web-form that lets the user edit some parts of the script body, the parameter and some aditional python code is added by a script/method. (I hope this makes sense ...) I am trying understand how the "PythonScript.py" does things but do to my limited knowledge (Zope-Newbie) I get stuck. My idea was to use the read() function to read the body into my custom form an write it back with the write() function. But doing this I don't use the nifty code-checking feature which I would like to use. Could someone please give me a hint if I am totally off-track? Regards Christoph
Christoph Landwehr wrote at 2003-9-12 14:56 +0200:
I would like create a custom DTML-Method to edit a python-script within Zope.
The so called "Monkey patch" technique may help you. There is a HowTo on Zope.org. Dieter
participants (2)
-
Christoph Landwehr -
Dieter Maurer