code: def show_form_for_method(self, view, method, request, obj):
          
          if method not in view.allowed_methods:
              return  # Not a valid method
  
          try:
              view.check_permissions(request)
              if obj is not None:
                  view.check_object_permissions(request, obj)
          except exceptions.APIException:
              return False  # Doesn't have permissions
          return True
docs: Returns True if a form should be shown for this method.