Change your line in class DocumentContainerResource(...) , from
pod_events = fields.ToManyField('portal.api.resources.DocumentEventResource', 'pod_events')
to
pod_events = fields.ToManyField('portal.api.resources.DocumentEventResource', 'pod_event_set')
The suffix for pod_event in this case should be _set , but depending on the situation, the suffix can be one of the following:
If each event can be associated with only one container, also consider changing:
pod = fields.ForeignKey(DocumentContainerResource, 'pod')
in
pod = fields.ToOneField(DocumentContainerResource, 'pod')
sampson-chen
source share