title: DRF Class based view api data filtering issue
body: <p>I'm trying to add Update and Destroy view to this view. But the problem is I know how to do that with function-based view and I'm using here class-based.</p>
  <p><code>views.py</code></p>
  <pre class="lang-py prettyprint-override"><code>class UpdatePostView(generics.RetrieveUpdateDestroyAPIView):
      permission_classes = [permissions.IsAuthenticated]
      serializer_class = PostSerializer
      queryset = Post.objects.all()
      lookup_field = 'id'
  </code></pre>
  <p><code>serializers.py</code></p>
  <pre class="lang-py prettyprint-override"><code>class PostSerializer(serializers.ModelSerializer):
      class Meta:
          model = Post
          fields = '__all__'
  </code></pre>
  <p><strong>Problem 1:</strong> Any user can delete or update any post from other users</p>
  <p><strong>Problem 2:</strong> In update method there is an option to update user</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;id&quot;: 2,
      &quot;title&quot;: &quot;Post 1&quot;,
      &quot;image&quot;: null,
      &quot;user&quot;: 3
  }
  </code></pre>
  <p>I'm trying to keep these views as class based view as I can to reduce code lines</p>