title: Getting "AttributeError: 'QuerySet' object has no attribute '_meta'" on django rest "PUT" method
body: <p>I am trying to update the record with PUT method, Getting AttributeError: 'QuerySet' object has no attribute '_meta'.
  My models.py:</p>
  
  <pre><code>class TableInfo(models.Model):
  
      table_name = models.CharField(max_length=10)
      columns = JSONField(null=False)
  </code></pre>
  
  <p>serializer.py:</p>
  
  <pre><code>class TableInfoSerializer(serializers.ModelSerializer):
  
      class Meta:
          model = TableInfo
          fields = '__all__'
  </code></pre>
  
  <p>views.py :</p>
  
  <pre><code>@api_view(['GET','PUT'])
  def table_info(request):
      try:
          queryset = TableInfo.objects.all()
          print("1")
      except TableInfo.DoesNotExist:
          return Response(status=status.HTTP_404_NOT_FOUND)
  
      if request.method == 'GET':
          print("2")
          serializer_class = TableInfoSerializer(queryset, many=True)
          return Response(serializer_class.data)
  
      elif request.method == 'PUT':
          print(request.data)
          serializer = TableInfoSerializer(queryset, data=request.data)
  
          if serializer.is_valid():
              serializer.save()
              print("4")
              return HttpResponse(serializer.data)
          return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  </code></pre>
  
  <p>code is breaking at <code>if serializer.is_valid():</code>
  On "GET" I am getting the result. Please help me with "PUT" method.</p>