[Zope] Redirecting based upone user
Tino Wildenhain
tino at wildenhain.de
Sun Aug 17 23:51:52 EDT 2003
Hi Simon,
Simon Faulkner wrote:
> I have a list of users names in a MySQL table and I would like to
write an
> index_html ZPT that sends the user to show_depots?depot=user/GetUsernName
> (ZPT) if they are in the MySQL list and show_countries (a different
ZPT) if
> they are not.
>
> How should I go about this? Do I make index_html a Python script or ask
> them to login to a script /tracking/login maybe?
more elegant:
make one python script called
index_html
and let it call
return show_depots(depot=user.GetUserName())
or
return show_countries(context)
according to your depencies.
This looks cleaner (URL in the Browser would be the
same) - so more Zopish
and is easy to maintain.
Avoid redirection where possible.
Regards
Tino Wildenhain
More information about the Zope
mailing list