title: How to update a single field in a model using UpdateAPIView from Djangorestframework?
body: <p>I'm learning generic views and creating some Api's. How can I update the field: "mobile" from Model :"Contacts"?</p>
  
  <p>I want to get the user id from url(mobile/update/user_id). But while creating the queryset its not working. I want to do something like mentioned here(#queryset = Contacts.objects.filter(id=Usertab.objects.filter(id=self.kwargs['id']).first().contact.id))</p>
  
  <p>'''python</p>
  
  <pre><code>class UpdateMobileAPIView(generics.UpdateAPIView):
  queryset = Contacts.objects.filter(pk=Usertab.objects.all())
  
  serializer_class = ContactsSerializer
  lookup_field = 'pk'
  
  def update(self,instance,request):
      instance = self.get_object()
      serializer= self.get_serializer(instance,data=request.data,partial=True)
      if serializer.is_valid():
          serializer.save()
          return Response({"message":"mobile number updated successfully"})
  
      else:
          return Response({"message":"failed"})
  </code></pre>
  
  <p>'''
  These are models</p>
  
  <pre><code>class Contacts(models.Model):
  
  mobile = models.IntegerField(null=False)
  Landline = models.IntegerField(null=False)
  whats_app = models.IntegerField(null=False)
  </code></pre>
  
  <p>class Usertab(models.Model):</p>
  
  <pre><code>username = models.CharField(max_length=255,null=False,blank=False)
  address = models.CharField(max_length=255,null=False,blank=False)
  pin_code = models.CharField(max_length=255,null=False,blank=False)
  contact = models.ForeignKey(Contacts,related_name="contacts_user")
  </code></pre>
  
  <p>class Email(models.Model):</p>
  
  <pre><code>user = models.ForeignKey(Usertab,related_name="user_email")
  email = models.CharField(max_length=255,null=False,blank=False)
  is_verified = models.BooleanField(default=False)
  </code></pre>
  
  <p>'''</p>
  
  <p>'''this is the serializer</p>
  
  <pre><code>class ContactsSerializer(ModelSerializer):
  
  class Meta:
      model = Contacts
      fields = '__all__'
  
  def update(self, instance, validated_data):
      instance.mobile = validated_data.get('mobile', instance.mobile)
      instance.save()
      return instance
  </code></pre>
  
  <p>'''</p>
  
  <p>TypeError: update() got an unexpected keyword argument 'pk'</p>