title: django rest framework : Is possible to create a put/patch request without using primary key?
body: <p>I want to update 2 fields is_exempted and comments from the data I get using put http method. And I can get multiple recommendation data from http method. And model doesn't have a field which I can consider pk for each account_id there can be multiple entries.</p>
  
  <p>models.py</p>
  
  <pre><code>class Recommendation(models.Model):
      account             = models.ForeignKey(Accounts, on_delete=models.CASCADE)
      account_name        = models.CharField(max_length=255, blank=True, null=True)
      instance_id         = models.CharField(max_length=255, blank=True, null=True)
      month_year          = models.CharField(max_length=50, blank=True, null=True)    
      instance_type       = models.CharField(max_length=255, blank=True, null=True)
      is_exempted         = models.CharField(max_length=50, default='no', null=False)
      comments            = models.CharField(max_length=255, blank=True, null=True)
  </code></pre>
  
  <p>serializers.py</p>
  
  <pre><code>class RecommendationSerializers(serializers.ModelSerializer):
  
      class Meta:
          model = Recommendation
          fields = ( 'account_id', 'account_name', 'instance_id', 'instance_type', 'is_exempted', 'comments', 'month_year')
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>@api_view(['PUT'])
  def update_recommendation_data(request):
      output = []
      if request.method == 'PUT':
          if request.data:
              for d in request.data:
                  print(d)
                  serializer = RecommendationSerializers(data=d, partial=False)
                  if serializer.is_valid():
                      serializer.save()
                  output.append(serializer.data)
          return Response(data=output, status=status.HTTP_200_OK)
      return Response(data="BAD REQUEST", status=status.HTTP_400_BAD_REQUEST)
  </code></pre>
  
  <p>urls.py</p>
  
  <pre><code>router = routers.DefaultRouter()
  urlpatterns = [url("^", include(router.urls)),
  url(r'^updaterecommendation$', views.update_recommendation_data)]
  </code></pre>