title: Axios Delete 405 (Method Not Allowed) Error with Django Rest Framework
body: <p>I am using ReactJS as client side web app and I'm using axios package. In my backend, I am using Django Rest Framework. I created Serializer for CartItem Model:</p>
  
  <pre><code>class CartItemSerializer(serializers.ModelSerializer):
      class Meta:
          model = CartItem
          # Fields you want to be returned or posted
          fields = '__all__'
  </code></pre>
  
  <p>Viewset:</p>
  
  <pre><code>class CartItemViewSet(viewsets.ModelViewSet):
      queryset = CartItem.objects.all()
      serializer_class = CartItemSerializer
  </code></pre>
  
  <p>I am trying to use default delete method of DRF in axios using so:</p>
  
  <pre><code>axios.delete('cart_items/', {
                  headers: { Authorization: 'Token token' },
                  data: {
                      id: 1,
                  },
              })
              .then(res =&gt; {
                  console.log(res)
              })
  </code></pre>
  
  <p>When I call that, it gives me error in React: DELETE <a href="http://127.0.0.1:8000/cart_items/" rel="nofollow noreferrer">http://127.0.0.1:8000/cart_items/</a> 405 (Method Not Allowed)</p>