[Zope] answer in the bindings??
Marie Robichon
robichon@esrf.fr
Mon, 01 Jul 2002 12:18:54 +0200
--=====================_13271574==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed
hi,
I want to pass a string generated from a Python script via a form when
creating an instance of a ZClass. The script is as follows:
## Script (Python) "lfsPathImages"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
request = context.REQUEST
result=[]
baseStr = request.BASE0
urlStr = request.URL1
result ='/www/doc/images'+ urlStr[len(baseStr):]
return result
The script is located in my (virtual) root. I want it to return the path
of the current folder (less the but when it is called from within the
PageContainer_addForm it picks up the path of the factory and not the path
of the current folder, see below:
/www/doc/images/Machine/manage_addProduct/PageContainer/PageContainer_factory
I suppose the answer is in the bindings but being such a newbie, I don't
quite understand this yet.
Can anyone help?
TIA
Marie Robichon
Web Task Force
European Synchrotron Radiation Facility
BP 220
38043 Grenoble Cedex
France
http://www.esrf.fr
Tel: (33) 04 76 88 21 86
Fax: (33) 04 76 88 24 27
--=====================_13271574==_.ALT
Content-Type: text/html; charset="us-ascii"
<html>
hi,<br>
<br>
I want to pass a string generated from a Python script via a form when
creating an instance of a ZClass. The script is as follows:<br>
<font face="Courier New, Courier">## Script (Python)
"lfsPathImages"<br>
##bind container=container<br>
##bind context=context<br>
##bind namespace=<br>
##bind script=script<br>
##bind subpath=traverse_subpath<br>
<br>
request = context.REQUEST<br>
result=[]<br>
baseStr = request.BASE0<br>
urlStr = request.URL1<br>
result ='/www/doc/images'+ urlStr[len(baseStr):]<br>
return result<br>
<br>
</font>The script is located in my (virtual) root. I want it to
return the path of the current folder (less the but when it is called
from within the PageContainer_addForm it picks up the path of the factory
and not the path of the current folder, see below:<br>
<br>
<b>/www/doc/images/Machine/manage_addProduct/PageContainer/PageContainer_factory<br>
<br>
</b>I suppose the answer is in the bindings but being such a newbie, I
don't quite understand this yet.<br>
<br>
Can anyone help?<br>
<br>
TIA<br>
<br>
<br>
<div>Marie Robichon</div>
<br>
<div>Web Task Force</div>
<div>European Synchrotron Radiation Facility</div>
<div>BP 220</div>
<div>38043 Grenoble Cedex</div>
<div>France</div>
<br>
<div><a href="http://www.esrf.fr/" EUDORA=AUTOURL>http://www.esrf.fr</a></div>
<br>
<div>Tel: (33) 04 76 88 21 86</div>
Fax: (33) 04 76 88 24 27
</html>
--=====================_13271574==_.ALT--