RE: [Zope] Question on folders
try calling it like: <table> <dtml-in "queries.sql_showTitles()"> <tr><td><dtml-var title></td></tr> </dtml-in> </table> jens -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Daniel Yoo Sent: Monday, February 14, 2000 23:28 To: zope@zope.org Subject: [Zope] Question on folders I'm trying to figure out how to access SQL methods within folders. Here's the directory structure I have so far: dyoo queries sql_booklist (MySQL connection) sql_showTitles (SQL method) index_html I've independently tested sql_showTitles to make sure it works. In my index_html, I'm having difficulty accessing stuff in queries: <table> <dtml-in queries.sql_showTitles> <tr><td><dtml-var title></td></tr> </dtml-in> </table> And Zope complains: Traceback (innermost last): File /home/dyoo/Zope-2.1.4-linux2-x86/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /home/dyoo/Zope-2.1.4-linux2-x86/lib/python/ZPublisher/Publish.py, line 179, in publish File /home/dyoo/Zope-2.1.4-linux2-x86/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook (Object: ElementWithAttributes) File /home/dyoo/Zope-2.1.4-linux2-x86/lib/python/ZPublisher/Publish.py, line 165, in publish File /home/dyoo/Zope-2.1.4-linux2-x86/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: index_html) File /home/dyoo/Zope-2.1.4-linux2-x86/lib/python/ZPublisher/Publish.py, line 102, in call_object (Object: index_html) File /home/dyoo/Zope-2.1.4-linux2-x86/lib/python/OFS/DTMLDocument.py, line 166, in __call__ (Object: index_html) File /home/dyoo/Zope-2.1.4-linux2-x86/lib/python/DocumentTemplate/DT_String.p y, line 502, in __call__ (Object: index_html) File /home/dyoo/Zope-2.1.4-linux2-x86/lib/python/DocumentTemplate/DT_In.py, line 630, in renderwob (Object: queries.sql_showTitles) KeyError: (see above) I'm not quite sure, but is this a case where <dtml-with> is needed? I don't quite have a handle on the syntax of it. Any help would be greatly appreciated, thanks! _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Tue, 15 Feb 2000, Jens Vagelpohl wrote:
try calling it like:
<table> <dtml-in "queries.sql_showTitles()"> <tr><td><dtml-var title></td></tr> </dtml-in> </table>
Thank you; that worked! ... er... but why? *grin* Where could I have found the information about this?
participants (2)
-
Daniel Yoo -
Jens Vagelpohl