[Zope] Newbie questions: Calling PageTemplates from Python, and getting meta-info on ZSQL method results

Ben Avery ben@thesite.org
Thu, 08 Aug 2002 15:04:44 +0100


re: the ZSQL question...

ZSQL methods return a Results object, there's a nice how-to at:
http://www.zope.org/Members/spinwing/ZSQL_Results

hope this helps,

Ben

Leeuw van der, Tim wrote:

>Hi,
>
>I've got a couple of newbie-questions.
>
>1. I want to call a PageTemplate from a Python script, and pass in
>parameters. How can I access those parameters in the PageTemplate?
>
>2. How can I find out the fields which are in the resultset of a ZSQL
>method, using either Python or PageTemplates?
>
>I do: SELECT * FROM employees. I know that the table employees contains the
>fields emp_id, first, last, salary so I can code for it. But it would be
>nices and more generic if I could infer from the resultset itself what
>fields it has, and to extract them dynamically instead of coded into the
>PageTemplate. That way I could make a generic PageTemplate that works for
>any ZSQL method result.
>
>
>3. How do I install the MySQLdb driver on Win2k? The installer only finds my
>Python21 installation, and not my Zope installation and it doesn't give me
>the option to enter a directory manually. I don't have MSVC++ compilers
>installed, only gcc from cygwin, so I don't think that compiling it myself
>will work. Any hints from anyone?
>
>
>With thanks,
>
>--Tim
>
>
>_______________________________________________
>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 )
>
>  
>