[Zope] using dtml within python within dtml
happyrhino@usa.net
happyrhino@usa.net
31 Aug 99 12:25:20 MDT
If I wish to assign a value to Zope variable or property within
a DTML method, I can use this =
<dtml-call "REQUEST.set(variable_name, python_expression)">
But how can I use a DTML/Zope expression within the python_expression ?
For example, the time can be found in DTML using this =
<dtml-var ZopeTime fmt=%H:%M>
I can't use the following =
<dtml-call "REQUEST.set(variable_name, ZopeTime fmt=%H:%M)">
So, how would it be done ?
Whilst on this subject, is it true that the python_expression above
is limited to string and math services ?
Say I have the following pure python code =
import my_custom_module
x = my_custom_module.my_function()
How can I assign x to a Zope variable zopeY ?
That is, how can those 2 lines of python be incorporated into the
python_expresion below ?
<dtml-call "REQUEST.set(zopeY, python_expression)">
Or am I trying to use too much Python within Zope ?
TIA,
Henry
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1