Hi there:

Hopefully you guys can help me. I'm working on an application that needs to
be able to selectively output JSON based on whether the submitted requestion
specifies "application/json" in the request's 'Accept:' headers. I had a
mechanism that worked okay in Pylons 0.9.6 based on a custom error_mapper in
config/middleware.py, wrapped up in a nice little function I could call, but
due to changes in how this works in Pylons 0.9.7 (I'm using RC4 on Python
2.5.1), which I've had to upgrade to for unrelated reasons, I'm a bit lost.
I've found references to being able to do this by setting an environment
variable ('pylons.status_code_redirect') in the docstrings for
pylons.middleware.StatusCodeRedirect but I can't figure out how to apply
this selectively rather than all the time. Can anyone shed some wisdom on
this?

Thanks,
Domhnall.
-- 
Quidquid latine dictum sit, altum sonatur.
(Whatever is said in Latin sounds profound)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to