title: Expected view to be called with a url keyword argument named pk
body: <p>I am using Django..</p>
  
  <p>Here are my <strong>views</strong></p>
  
  <pre><code>class SettingsValues(generics.ListAPIView):
      serializer_class = SettingsSerializer
      permission_classes = (permissions.IsAuthenticatedOrReadOnly,)
  
      def get_queryset(self):
          queryset = Settings.objects.all()
          queryset = queryset.filter(user=self.request.user.id)
          return queryset
  
  class SettingsValuesUpdate(generics.UpdateAPIView):
      queryset = Settings.objects.all()
      serializer_class = SettingsSerializer
      permission_classes = (permissions.IsAuthenticatedOrReadOnly,)
  
      def perform_update(self, serializer):
          serializer.save(user=self.request.user.id)
  </code></pre>
  
  <p>Here is my <strong>model</strong></p>
  
  <pre><code>class Settings(models.Model):
      user = models.OneToOneField('auth.User', related_name='settings', on_delete=models.CASCADE)
      boolean1 = models.BooleanField(default=False)
      boolean2 = models.BooleanField(default=False)
      boolean3 = models.BooleanField(default=False)
      string1 = models.CharField(max_length=100, default='No description')
  </code></pre>
  
  <p>My <strong>serializer</strong></p>
  
  <pre><code>class SettingsSerializer(serializers.ModelSerializer):
      class Meta:
          model = Settings
          fields = ('id', 'boolean1', 'boolean2', 'boolean3', 'string1')
  
  class UserSerializer(serializers.ModelSerializer):
      class Meta:
          model = User
          fields = ('id', 'username', 'email', 'password' ,'settings', 'image')
      extra_kwargs = {'password': {'write_only': True}}
  </code></pre>
  
  <p>My <strong>urls</strong></p>
  
  <pre><code>url(r'^settings/?$', views.SettingsValues.as_view()),
  url(r'^updsettings/?$', views.SettingsValuesUpdate.as_view()),
  </code></pre>
  
  <p>I am using Angular 2 or postman app it does not matter.. When i return settings it is working fine. but when i try to update the user settings (PUT) it shows an error</p>
  
  <p>Expected view SettingsValuesUpdate to be called with a URL keyword argument named "pk". Fix your URL conf, or set the <code>.lookup_field</code> attribute on the view correctly</p>
  
  <p>Any idea ?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>whit the answer of vinay kumar my view is</p>
  
  <pre><code>class SettingsValuesUpdate(viewsets.ModelViewSet):
      queryset = Settings.objects.all()
      serializer_class = SettingsSerializer
      permission_classes = (permissions.IsAuthenticatedOrReadOnly,)
  
      @detail_route(methods='PUT')
      def perform_update(self, serializer):
          serializer.save(user=self.request.user.id)
  </code></pre>
  
  <p>but there is an error still which is {"detail":"Method \"PUT\" not allowed."}</p>