          slug_field = slug and self.slug_field or None
  
          if pk:
              setattr(obj, 'pk', pk)
  
          if slug:
 
</s>
        if lookup:
            setattr(obj, self.lookup_field, lookup)

          slug_field = slug and self.slug_field or None
  
        if lookup:
            setattr(obj, self.lookup_field, lookup)

          if pk:
              setattr(obj, 'pk', pk)
  
          if slug:
keep add keep keep keep keep
 introduce lookup_field and add pendingdeprecationwarnings
rest_framework/mixins.py