Ok, this is weird. When I try something like <dtml-var "object"> in the sarge debian distro of zope, then it does what I expect it to do i.e. return the code of the dtml method "object" rather than render it. However, the same dtml in the woody version results in a "unexpected EOF while parsing" Any comments? I would have expected that something like <dtml-var "object.document_src()"> should have worked? Stacktrace for interest <!-- Traceback (innermost last): File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 150, in publish_module File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 114, in publish File /usr/lib/zope/lib/python/Zope/__init__.py, line 159, in zpublisher_exception_hook (Object: edit) File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 98, in publish File /usr/lib/zope/lib/python/ZPublisher/mapply.py, line 88, in mapply (Object: manage_edit) File /usr/lib/zope/lib/python/ZPublisher/Publish.py, line 39, in call_object (Object: manage_edit) File /usr/lib/zope/lib/python/OFS/DTMLMethod.py, line 254, in manage_edit (Object: edit) File /usr/lib/zope/lib/python/DocumentTemplate/DT_String.py, line 320, in munge (Object: edit) File /usr/lib/zope/lib/python/DocumentTemplate/DT_String.py, line 340, in cook (Object: edit) File /usr/lib/zope/lib/python/DocumentTemplate/DT_String.py, line 170, in parse (Object: edit) File /usr/lib/zope/lib/python/DocumentTemplate/DT_String.py, line 223, in parse_block (Object: edit) File /usr/lib/zope/lib/python/DocumentTemplate/DT_String.py, line 177, in parse (Object: edit) File /usr/lib/zope/lib/python/DocumentTemplate/DT_String.py, line 58, in parse_error (Object: edit) Document Template Parse Error: (see above) -->
pieter claassen wrote:
<dtml-var "object"> in the sarge debian distro of zope, then it does what I expect it to do i.e. return the code of the dtml method "object" rather than render it.
Your code above is working off an assumption.
<dtml-var "object.document_src()"> should have worked?
The above looks okay. From the traceback, it looks like this happened when you were editting the DTML method. If that's the case, then you have some other bug in your DTML. Really, you should switch to ZPT which has much more useful reporting of these kinds of problems. Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (2)
-
Chris Withers -
pieter claassen