Hi,

I'm trying to do something fairly simple (and doable), but I was
wondering if there was a "best practices" approach. I'm developing a
client-heavy app, and I'd like to return something like this to my
JavaScript:

{"posts": Post.objects.all(), "comments": Comment.objects.all()}

Right now, I'm just running serializer.serialize on each of the query
sets and constructing the JSON string myself, but I have more
complicated use case where that becomes messy.

Is there a clean way to do this?

Best,
Vernon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to