title: Django Rest Framework - Specify a custom lookup field for related ModelSerializer
body: <p>Sorry if this is a repeat, I tried searching for this with no luck.</p>
  
  <p>I would like to know, how to specify a lookup field for a related model.</p>
  
  <p>For example I have models related using a foreign key like so</p>
  
  <pre><code>class Quiz(models.Model):                                                                                      
      guid = models.CharField(max_length=11, unique=True, blank=True)
  
  class Result(models.Model):
      guid = models.CharField(max_length=11, unique=True, blank=True)
      quiz = models.ForeignKey(Quiz)
  </code></pre>
  
  <p>Here I use <code>guid</code> as my unique identifier and I have my model serializers as below.</p>
  
  <pre><code>class QuizSerializer(serializers.ModelSerializer):                                                                                 
      results = ResultSerializer(many=True, required=False)
  
      class Meta:
          model = Quiz
          fields = ('guid', 'results')
  
  class ResultSerializer(serializers.ModelSerializer):
      #lookup_field = 'guid' =&gt; Does not seem to work??
  
      class Meta:
          model = BroncoResult
          fields = ('guid',)
  </code></pre>
  
  <p>In the view I use <code>viewsets.ModelViewSet</code> </p>
  
  <pre><code>class QuizViewSet(viewsets.ModelViewSet):                                                                                          
      queryset = Quiz.objects.all()
      serializer_class = QuizSerializer
      lookup_field = 'guid'
  </code></pre>
  
  <p>Which returns data like this
  <code>
  {"guid": "12312312312", "results": [{"guid": "45645645666"}, {"guid": "78978978999"}]}
  </code></p>
  
  <p>I can specify the lookup field be <code>guid</code> for the <code>Quiz</code> model, in the <code>QuizViewSet</code> but how can I specify the lookup field be <code>guid</code> for the <code>Result</code> model in the serializer?</p>
  
  <p>I seem to be getting the following error on a PUT request
  <code>
  {"results": [{"guid": ["Result with this Guid already exists."]}
  </code>
  which I think is because it is trying to retrieve the record by <code>id</code> and not finding it, and throwing the error because it tries to create a new record with the same unique guid.</p>
  
  <p>Any body know how to specify that the result field use <code>guid</code> as the lookup as well?</p>
  
  <p>Thanks for your help.</p>