Matt Dugan wrote:
> joey101 wrote:
> > ok, I got it to send the data. But I still can't figure out how to get
> > any data back from the server.
>
> Make sure you have the method in your controller set to output JSON and
> you explicitly return a set, like this:
>
> #if you want to use the request to identify if the response is json,
> # use allow_json=True instead of tg_format="json" here.
> @expose(tg_format="json")
> def myJsonPage(self, requestJson=None, **kwargs):
>     """Take in a request parameter called requestJson with json in it
> if it is available, and never break on more parameters being sent."""
>
>     requestDict=simplejson.
>     #... do some stuff
>     requestObj = json.unjsonify_Request(requestJson)
>     #... do some more stuff
>     responseDict = json.jsonify_Response(responseObj)
>
>     return responseDict

hello,
what is 'json'? I mean, where are you importing it from? Because
turbogears.jasonify doesn't have that method... :/

But I'm thinking this it's not working for me... I'm not passing what
it is expecting.


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

Reply via email to