durusmail: quixote-users: can a _q_lookup return a redirect?
can a _q_lookup return a redirect?
2004-11-11
2004-11-11
2004-11-11
2004-11-11
2004-11-11
code and doc
2004-11-11
2004-11-11
2004-11-11
2004-11-11
2004-11-12
2004-11-13
2004-11-11
OT: code and doc
2004-11-11
2004-11-11
2004-12-03
2004-12-03
2004-12-03
can a _q_lookup return a redirect?
Oleg Broytmann
2004-11-11
On Thu, Nov 11, 2004 at 04:02:14PM +0100, Mario Ruggier wrote:
>     def _q_lookup(self, request, component):
>         # ... do something with component ...
>         print component, request.get_url(),
> request.get_header('HTTP_REFERER')
>         request.redirect(request.get_header('HTTP_REFERER') or '/path/'

from quixote.util import Redirector
....
   def _q_lookup(self, request, component):
....
      return Redirector("/new/location")

Oleg.
--
     Oleg Broytmann            http://phd.pp.ru/            phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

reply