Re: Retrieving Unrelated Objects in Django REST Framework

2020-01-20 Thread Gonzalo Amadio
If they are both O2O relations, why do not you make another model where you store the three id's? If not I guess you can just access the same way you access Application from Offer. something like: offer.application.contract , I mean if you can find application, just acces the contract via dot no

Retrieving Unrelated Objects in Django REST Framework

2020-01-20 Thread Foobar
My model consists of 3 classes: Offer, Application, and Contract. Relationships are as follows: (1) Application to Offer: One to One (2) Application to Contract: One to One Is there a way for me to access Contract from Offer via Application in a single REST call? I know how to access Appl