On Wed, Nov 12, 2008 at 3:38 AM, project2501 <[EMAIL PROTECTED]> wrote:
>
> Hi,
>  I am trying to expose a controller method without a template because
> it will return a JSON to an AJAX script, but it throws errors when I
> declared parameters or leave them blank. I put @expose on the method.
> Is there something else needed?

yes. I do this all the time. Just @expose() and return your raw
data... if you need raw data
or you can @expose(format='json') and return a python dict that will
automatically be jsonified.

If you send complex python objects in your dict you may have to write
your own jsonification rules.


> Also, is it possible to upgrade to CherryPy 3.1.1 in TG?

ChrisZ answered before I could write something in that part of the
email so I'll not add more here...

Florent.

--~--~---------~--~----~------------~-------~--~----~
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