[Zope] How to redirect in ZPT.

Tino Wildenhain tino at wildenhain.de
Tue Feb 3 12:08:36 EST 2004


HI Jason,

Jason C. Leach schrieb:
> hi,
> 
> So I have a DTML I would like to convert to a ZPT.  Its name is index_html
> and does this:
> <dtml-call expr="RESPONSE.redirect(absolute_url() + '/' +
> REQUEST['AUTHENTICATED_USER'].getUserName())">

This is better converted directly into a python script.
Its logic, not presentation.

You are not supposed to write the big bunch of logic in ZPT.
(You arent in DTML either, but the bad habit of writing
code in DTML has old roots)

Best option is to isolate complicated (and even some
of the simpler) logic into python script(s) and
combine it with one or more ZPT as you see fit.

Regards
Tino Wildenhain





More information about the Zope mailing list