le 02.12.2008 19:52 Jorge Vargas a écrit:
> Hello guys, I have been working with a heavy ajaj app (I hate that
> name), and I find myself doing this a lot, when debugging.
>
> changing
> @expose('json')
> to
> @expose()
>
> changing return type to str, in order to see the actual json stream on
> the browser window.
>
> so why not have a @expose('jsondebug') that will
> 1- set content type to text (so browsers will display instead of download)
> 2- pretty print the json obj, so we will get structure instead of a single
> line
> 3- ???
>
> what do you think?
>
Yes, it would be helpful...
Why not using a syntax like
@expose('json', format='debug')
so you could setup a global variable like json_debug = None | 'debug'
ans pass it to all the @expose('json', format=json_debug)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Trunk" 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-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---