title: Custom object permissions not working in django rest framework
body: <p>I am using custom permission class in django rest APIView and calling <strong><em>check_object_permissions</em></strong> explicitly. but in some api (especially in retrive api) django calling <strong><em>check_object_permission</em></strong> by default. how to override the view to stop implicit calls to <strong><em>check_object_permission</em></strong>. </p>
  
  <h1>Code</h1>
  
  <h2>views.py</h2>
  
  <pre><code>    class StreamOptionDetails(APIView):
          """
          Retrieve, update or delete a snippet instance.
          """
  
          permission_classes = (IsOwnerOrReadOnly,)
  
          def get_object(self, pk):
              try:
                  obj = Stream.objects.get(pk=pk)
                  self.check_object_permissions(self.request, obj)
                  return obj
              except Stream.DoesNotExist:
                  raise Http404
  
          def get_option(self, pk):
              try:
                  return StreamOption.objects.get(pk=pk)
              except StreamOption.DoesNotExist:
                  raise Http404
  
          def get(self, request, stream=None, pk=None, format=None):
              self.get_object(stream)
              stream_option = self.get_option(pk)
              serializer = StreamOptionsSerializer(stream_option)
              return Response(serializer.data)
  </code></pre>
  
  <h2>error</h2>
  
  <pre><code>AttributeError at /streams/2/options/15/
  'StreamOption' object has no attribute 'members'
      Request Method: GET
      Request URL:    http://localhost:8000/streams/2/options/15/
      Django Version: 1.10
      Exception Type: AttributeError
      Exception Value:    
      'StreamOption' object has no attribute 'members
      Exception Location: 
        /home/suh/workspace/distribution/streams/permissions.py in 
        has_object_permission, line 13
  </code></pre>
  
  <h2>permission.py</h2>
  
  <pre><code>from rest_framework import permissions
  
  
  class IsOwnerOrReadOnly(permissions.BasePermission):
      """
      Custom permission to only allow owners of an object to edit it.
      """
  
      def has_object_permission(self, request, view, obj):
          # Read permissions are allowed to any request,
          # so we'll always allow GET, HEAD or OPTIONS requests.
          if request.user.username   and  request.method in permissions.SAFE_METHODS:
              members = obj.members.filter(user=request.user)
              if len(members):
                  return True
          # Write permissions are only allowed to the owner of the snippet.
          return obj.owner == request.user
  </code></pre>
  
  <h2>how to stop this calls</h2>
  
  <pre><code>File "/home/thoughtchimp/.virtualenvs/django-py3/lib/python3.5/site-    packages/rest_framework/renderers.py" in get_rendered_html_form
    474.             if not self.show_form_for_method(view, method,     request, instance):
  
  File "/home/thoughtchimp/.virtualenvs/django-py3/lib/python3.5/site-packages/rest_framework/renderers.py" in show_form_for_method
    431.                 view.check_object_permissions(request, obj)
  
  File "/home/thoughtchimp/.virtualenvs/django-py3/lib/python3.5/site-packages/rest_framework/views.py" in check_object_permissions
    338.             if not permission.has_object_permission(request,     self, obj):
  </code></pre>