On Tue, 2007-25-09 at 22:58 -0400, Mark Ramm wrote:
> Unfortunately in tg1 the JSON stuff is done in the expose decorator
> function, and it's not done in a way that's easily visible to the
> wrapped function (your controller).
> 
> In TG2 this will be changed so that the base controller class does the
> content negotiation, and the expose decorator registers information in
> a location that can be accessed from the base controller, but also
> from your controller methods.
> 
> This question makes me thing we should also expose a way to ask for
> the expected "results" of the content negotiation process in the
> controller method (this, actually should be pretty easy.)
> 
> Some of this stuff is still being worked out, ase we decide where the
> expose decorator, and it's friends will live in Pylons/tg2 land
> (should they go up into Pylons, or stay in TurboGears land?)

That sounds really promising. From a users point of view, I think it
would be sweet if all that sort of stuff ( and more ) were easily
accessible through some per request updated 'global' ( singleton? ) tg
object, regardless of where in the stack it's implemented. So that no
matter where I was in controller code, if I wanted to find out what some
per request settings were I could just read say:

tg_request.format

or something. Looking forward to tg2!

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