As mentioned in another post, when you have other decorators, the situation becomes complicated.
I would say that return means it is a "normal" flow that the page is properly handled by the current function, may be it stucks different value into the returned dictionary(including an alternative template) but still normal. Redirect is "I don't know how to handle this and returning to my caller is meaningless, another URL is better for what follows". Of course it is still a matter of choice(and convention) as I can simply return simply string which in general would bypass all turbogears handling. I just want to point out the possible scenario one may be facing. Leandro Lucarella wrote: > 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

