Thanks very much, Armin.  That worked.  I guess I have to get used to
passing WSGI applications around in certain circumstances, instead of
passing discrete data around as in PHP (I was overly fixated on the
response.data attribute).  Thanks again.

On Dec 21, 6:41 am, Armin Ronacher <[email protected]>
wrote:
> Hi,
>
> Sean Woods wrote:
> > My code raises an AttributeError: 'RequestRedirect' object has no
> > attribute 'find'
>
> A RequestRedirect is an HTTPException and as such a WSGI application.
>
> You can now either access `error.new_url` which is the new URL where you
> want to redirect to, or return the `error` as response from the
> application or just handle the RequestRedirect with an HTTPException
> handler:
>
> try:
>     endpoint, args = urls.match()
>     ...
> except NotFound, e:
>     response.data = 'Not Found!'
>     response.status_code = 404
> except HTTPException, e:
>     response = e # catches the RedirectException too
> return response(environ, start_response)
>
> Regards,
> Armin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pocoo-libs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to