[Zope3-dev] No redirect!
Stephan Richter
stephan.richter@tufts.edu
Fri, 25 Apr 2003 19:51:08 -0400
On Friday 25 April 2003 17:33, Marcus J. Ertl wrote:
> How may I give back a view?
>
> What I want to do is: In dependence of a cookie, I will return a
> different page. At the moment I do something like:
>
> self.request.response.redirect('index.html')
>
> but I don't like this! It does each time a unnecessary browser-server
> roundtrip! How may I hand back the view direct! It've tried something
> like
>
> return getView(self.context, 'index.html')
>
> but the browser only shows some strange <security proxied ...>-text!
I totally agree with Marcus' complaint. I hate the request.response.redirect
stuff as well. I wish I could say request.response.returnView(URL) that looks
up the view and returns it without a redirect.
What do others think about that?
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training