I'm trying to use Django Tastypie to allow an implementor to POST/PUT data to create models that are related several levels deep. So POST something like this (as JSON) to create let's call it a Blob, which has many Foos, each of which has many Bars (both models as well):
{"foos":[
{"bars":[
{"baz":"boo"}
]}
]}
The model relations are all set in my models.py and resources.py scripts so that Blobs have many Foos and Foos have many Bars. The problem is that in doing this, Tastypie seems to only go a single level deep with obj_create doing the related fields, so the Bars never get created, and it kicks back an error if that field is required or nothing gets stored if it isn't. How do I go about getting Tastypie to traverse down through the levels?
As a side note, I know I could use the separate Bar endpoint to create those first, and then pass in the resource URIs with the given Foo. But for arguments sake let's say that's not possible, I need to take the entire data representing a Blob as a single POST.