title: DRF "field is required" error on POST request?
body: <pre><code>curl --user testuser:passwordz -d '{"name":"testplatform"}' -X POST http://localhost:8080/api/v1/platforms
  </code></pre>
  
  <p>error</p>
  
  <pre><code>{"name":["This field is required."]}%
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>class platform_list(APIView):
  
      def get(self, request, format=None):
          query = request.GET.get('name')
          if query:
              platforms = Platform.objects.filter(name=query)
          else:
              platforms = Platform.objects.all()
          serializer = PlatformSerializer(platforms, many=True)
          return Response(serializer.data)
  
      def post(self, request, format=None):
          serializer = PlatformSerializer(data=request.data)
          if serializer.is_valid():
              serializer.save()
              return Response(serializer.data, status=status.HTTP_201_CREATED)
          return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
  </code></pre>
  
  <p>I know the auth works because if I type in wrong user or pass the error changes to "invalid credentials" . Why am I getting the field required error though?</p>