title: django REST combining 2 model views form for json curl
body: <p>I have models:</p>
  
  <pre><code>class Emp(models.Model):
      full_name = models.CharField(max_length=100)
      mobile = models.CharField(max_length=10,blank=True,null=True)
      email = models.EmailField(blank=True,null=True)
  
  class Enquiry(models.Model):
      date = models.DateField(default=timezone.now)
      number = models.AutoField(primary_key=True)
      products = models.ManyToManyField(Product, related_name="products") 
      referred_by_emp = models.ForeignKey(
          Emp,related_name='ref_emp',
          null=True,blank=True,
          )
  </code></pre>
  
  <p>The serializer classes:</p>
  
  <pre><code>class ReferrerSerializer(serializers.ModelSerializer):
      class Meta:
          model = Emp
          fields = (
              'full_name','mobile','email',
              )
  
  class EnquirySerializer(serializers.ModelSerializer):
      class Meta:
          model = Enquiry
          fields = (
              'name','mobile','email',
              'products',
              'referred_by_emp',
              )
  </code></pre>
  
  <p>I wish to get the attributes of Emp i.e full_name, mobile, email in the form while entering the Enquiry details. The views for the 2 models:</p>
  
  <pre><code>class RefViewSet(viewsets.ModelViewSet):
      """
      API endpoint that allows Emp instances to be viewed or edited.
      """
      model = Emp
      queryset = Emp.objects.all()
      serializer_class = ReferrerSerializer
  
  class EnquiryViewSet(viewsets.ModelViewSet):
          """
          API endpoint that allows Enquiry instances to be viewed or edited.
          """
          model = Enquiry
          queryset = Enquiry.objects.all()
          serializer_class = EnquirySerializer
  </code></pre>
  
  <p>While entering the Enquiry details in the django REST api, I wish to capture the Emp details also and submit the form. And the details should be captured in the respective models. How can this be achieved? I am new to django's REST Api and didn't find a proper way of doing it. Plz guide me with detailed code to achieve this. I tried itertools.chain, but perhaps didn't use it correctly Further I would like to invoke the curl command for the same.Thanx in advance 
  Using django 1.6.5</p>