[EMAIL PROTECTED], el jueves 20 de octubre a las 14:01 me escribiste:
> 
> I would disagree here(I believe we have talk about this before).
> 
> return cherrypy.HTTPRedirect.
> 
> It looks like two incompatible meaning in one. Do you want to return or
> redirect ?

You want to return the result of the operation. It can be a simple dict to
be processed by the template (or something else) or it can be a HTTP error
code.

What about:
if I_need_redirect:
        cherrypy.setResponseCode(cherry.py.HTTPRedirect)
        return

(I don't know that much about cherrypy so I'm making up the
setResponseCode function, but I guess cherrypy have something like it)

In this way you can even have a redirect and process the template too
(with some special values), because you can have a redirect error code and
a beatiful webpage explaining what happend in case the browser don't
support redirect (and the same for NotFound, Forbiden, etc).

-- 
 LUCA - Leandro Lucarella - JID: luca(en)lugmen.org.ar - Debian GNU/Linux
.------------------------------------------------------------------------,
 \  GPG: 5F5A8D05 // F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05 /
  '--------------------------------------------------------------------'
El techo de mi cuarto lleno de cometas

Reply via email to