title: UpdateAPIView not working: Method "PATCH" not allowed
body: <p>I use Django along with <strong>Django REST Framework</strong> to implement a <strong>RESTful API</strong>.</p>
  
  <p>What I have right now:</p>
  
  <ul>
  <li>A <code>ContentEntry</code> model</li>
  <li>A <code>ContentEntryCreateUpdateSerializer</code> serializer for my <code>ContentEntry</code> model</li>
  <li>A <code>ContentEntryCreate</code> view to create some <code>ContentEntry</code><em>ies</em></li>
  <li>A <code>ContentEntryUpdate</code> view to <strong>update</strong> the <code>ContentEntry</code><em>ies</em></li>
  </ul>
  
  <p>Here is the code:</p>
  
  <pre><code>from django.db import models
  from rest_framework import serializers
  from rest_framework import generics
  from rest_framework.views import APIView
  from my_api_app import views
  
  
  # models.py
  class ContentEntry(models.Model):
      content = models.ForeignKey(Content)
      quantity = models.IntegerField()
      container = models.ForeignKey(Container, related_name='content_entries')
  
  
  # serializers.py
  class ContentEntryCreateUpdateSerializer(serializers.ModelSerializer):
      class Meta:
          model = ContentEntry
          fields = ('id', 'content', 'quantity', 'container')
  
  
  # views.py
  class ContentEntryCreate(generics.CreateAPIView):
      queryset = ContentEntry.objects.all()
      serializer_class = ContentEntryCreateUpdateSerializer
  
  
  # views.py
  class ContentEntryUpdate(generics.UpdateAPIView):
      queryset = ContentEntry.objects.all()
      lookup_field = 'id'
      serializer_class = ContentEntryCreateUpdateSerializer
  
  
  # urls.py
  urlpatterns = [
      url(r'content-entry', views.ContentEntryCreate.as_view()),
      url(r'content-entry/(?P&lt;id&gt;\d+)$', views.ContentEntryUpdate.as_view()),
  ]
  </code></pre>
  
  <p>Everything is working fine except the <strong><code>ContentEntryUpdate</code> which always returns an error</strong>:</p>
  
  <pre><code>HTTP/1.1 405 Method Not Allowed
  Allow: POST, OPTIONS
  Content-Type: application/json
  Date: Wed, 03 May 2017 14:40:03 GMT
  Server: WSGIServer/0.2 CPython/3.6.1
  Vary: Accept, Cookie
  X-Frame-Options: SAMEORIGIN
  
  {"detail":"Method \"PATCH\" not allowed."}
  </code></pre>
  
  <p>As you can see in the <code>Allow</code> attribute, it seems that only the <code>POST</code> and <code>OPTIONS</code> methods are allowed by the server.</p>
  
  <p>It's very strange since <code>generics.UpdateAPIView</code> defines the <code>put</code> and <code>patch</code> methods.</p>
  
  <p>I don't think it's a <strong>permission</strong> problem since I allow everything:</p>
  
  <pre><code># settings.py
  REST_FRAMEWORK = {
      'DEFAULT_PERMISSION_CLASSES': [
          'rest_framework.permissions.AllowAny'
      ]
  }
  </code></pre>
  
  <p>What should I do <strong>to allow the HTTP <code>PATCH</code> and <code>PUT</code> methods</strong>?</p>