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

Jens Vagelpohl jens@zope.com
Thu, 8 Aug 2002 09:52:34 -0400


see the (excellent) ZPT tutorial at

http://www.zope.org/Wikis/DevSite/Projects/ZPT/TutorialPart3

see the section titled "Other Builtin Variables"

jens


On Thursday, August 8, 2002, at 09:45 , 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 )