Hi folks,

I'm sure I'm missing something simple, but can't work it out - hoping
someone can help me out.

I'm trying to use JSON with my TG2 app.

I have added the @expose("json") decorator as per the wiki tutorial (I
did see that this has not actually been TG2-ified yet). With two
decorators on the page, I can't tell it to use the JSON renderer by
specifying tg_format=json in the URL - I get an error saying
unexpected keyword argument tg_format. I gather from the lists that
the use of tg_format is unlikely to continue, or may even be gone
already, but I couldn't work out how to ask TG2 to return the page as
JSON.

Anyway, so I got rid of the ordinary template @expose decorator,
leaving only the @expose("json") and when I visit the URL with my
browser I do get a application/json type response, but it is empty. No
error messages in the logs or anything either.

Any help would be much appreciated.

Cheers
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