title: non_field_errors : ["Expected a list of items but got type "dict"."]
body: <p>I create realtime chat application using websocket frontend(angular) backend(Django).. I want to store messages in to db(mySql).. when I trying to store message from angular to django.. it give me error:</p>
  
  <pre><code>non_field_errors:
  ["Expected a list of items but got type "dict"."]
  </code></pre>
  
  <p>so what is wrong?</p>
  
  <p><strong>model.py</strong></p>
  
  <pre><code>class msg(models.Model):
      name = models.ForeignKey(User, on_delete=models.CASCADE)
      receiver = models.CharField(max_length=20)
      text = models.CharField(max_length=1200)
      myDate = models.DateTimeField()
  </code></pre>
  
  <p><strong>serializer.py</strong></p>
  
  <pre><code>class MesSerializer(serializers.ModelSerializer):
      name = serializers.SlugRelatedField(many=False, slug_field='name', queryset=User.objects.all())
      class Meta:
          model = msg
          fields = '__all__'
  </code></pre>
  
  <p><strong>view.py</strong></p>
  
  <pre><code>class msg_list(APIView):
      def get(self, request, format=None):
          mes = msg.objects.all()
          serializer = MesSerializer(mes, many=True)  # convert into JSON
          return Response(serializer.data)
  
      def post(self, request, formate = None):
          serializer = MesSerializer(data=request.data, many = True) #type list
          if serializer.is_valid():
              serializer.save()
              return JsonResponse(serializer.data, status=201)
          return JsonResponse(serializer.errors, status=400)
  </code></pre>