[Zope] passing information to a rendered ZPT from python

martin f krafft madduck@madduck.net
Sun, 11 May 2003 23:13:46 +0200

Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

i have a python script that ends with

  return getattr(context, 'a_page_template', None).render()

this works like a charm, rendering the page template and outputting
it as if the python script produced it.

however, i am not sure how i can pass some information (e.g.
a username) to the page template. so far i have been using the
REQUEST object, but that's an ugly hack, and it also doesn't work
(see previous post), so i'd like to do it right. how?

martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
keyserver problems? http://keyserver.kjsl.com/~jharris/keyserver.html
get my key here: http://madduck.net/me/gpg/publickey
"when faced with a new problem, the wise algorithmist
 will first attempt to classify it as np-complete.
 this will avoid many tears and tantrums as
 algorithm after algorithm fails."
                                                          -- g. niruta

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.1 (GNU/Linux)