I've read the docs on returning json, and can see that if I use
'allow_json=True' that the controller will detect that we want json
based on either tg_format="json" or headers with accept javascript.

What I can't figure out is how I can detect *within* controller code
what kind of return we'll be doing. I have been doing this:

if 'tg_format' in kwargs and kwargs['tg_format'] == "json":

But that will only for an explicit request. I'd like to return early
with out doing some server work that isn't necessary for the json
requests.

Thanks
Iain


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

Reply via email to