title: drf error, 'Expected a dictionary, but got QuerySet.'
body: <p>I have a problem with drf function view, I am getting an serializer error like this:
  <strong>{'non_field_errors': [ErrorDetail(string='Invalid data. Expected a dictionary, but got QuerySet.', code='invalid')]}</strong>
  Here's my function based view:</p>
  <pre><code>@api_view([&quot;GET&quot;,&quot;POST&quot;])
  def UserSearch(request):
      selected_users = Profile.objects.all()
      serializer = UserProfileSerializer(data=selected_users)
      if serializer.is_valid():
          return Response(data=serializer.data)
      else:
          return Response(serializer.errors,status=status.HTTP_400_BAD_REQUEST)
  </code></pre>
  <p>My serializer:</p>
  <pre><code>class UserProfileSerializer(serializers.ModelSerializer):
      class Meta:
          fields = ('user','name','surname','gender','country','city','sport')
          model = Profile
  </code></pre>
  <p>And Profile model:</p>
  <pre><code>class Profile(models.Model):
      user = models.OneToOneField(User,on_delete=models.CASCADE)
  
      name = models.CharField(max_length=50, blank=True)
      surname = models.CharField(max_length=50, blank=True)
      gender = models.CharField(max_length=50, blank=True)
  
      country = models.CharField(max_length=50, blank=True)
      city = models.CharField(max_length=50, blank=True)
      sport = models.CharField(max_length=60, blank=True)
  
      #date_of_birth = models.DateField()
      def __str__(self):
          return f&quot;{self.name} {self.surname} from {self.city}&quot;
  </code></pre>