title: ttributeError: type object '' has no attribute 'get_extra_actions'
body: <p>I am new to Django , and totally confused about the error I face.
  i am trying to create a rest api and apply django filtering option to it.</p>
  <p>here is my view code.</p>
  <pre><code>@permission_classes([AllowAny])
  class op_listView(generics.ListAPIView):
      serializer_class = op_Serializer
      queryset = Op.objects.all()
      filter_backends = (DjangoFilterBackend,OrderingFilter, SearchFilter)
      filter_fields=('website', 'organization__name', 'sectors__name','countries__name')
  </code></pre>
  <p>my model</p>
  <pre><code>class Op(models.Model):
      website = models.CharField(max_length=40)
      op_link = models.CharField(null=True, max_length=200)
      title = models.TextField(null=True)
      description = models.TextField(null=True)
      organization = models.ForeignKey(Organization, on_delete=models.DO_NOTHING)
      close_date = models.DateField(null=True)
      created_at = models.DateTimeField(auto_now_add=True, null=True)
      checksum = models.CharField(max_length=200, null=True)
      relevancy = models.IntegerField(null=True)
      mark_relevant = models.IntegerField(null=True)
      published_date = models.DateField(null=True)
      language = models.ForeignKey(Language, on_delete=models.DO_NOTHING, default=105)
      status = models.IntegerField(null=True, default=0)
      read_status = models.IntegerField(default=0)
  
      @property
      def attachments(self):
          return self.attachments_set.all()
  
      @property
      def countries(self):
          return self.country_set.all()
  
      @property
      def sectors(self):
          return self.sector_set.all()
  
      class Meta:
          db_table = &quot;op&quot;
  </code></pre>
  <p>my serializer</p>
  <pre><code>class op_Serializer(serializers.ModelSerializer) :
      attachments = attachments_Serializer(many=True , required=False)
      countries = country_Serializer(many=True , required=False)
      sectors = sector_Serializer(many=True , required=False)
  
      class Meta :
          model = Op
          fields = ['id', 'website', 'op_link', 'title', 'description' , 'organization' , 'close_date' ,
                    'created_at', 'relevancy', 'published_date', 'language' , 'status' , 'read_status' ,
                    'attachments', 'countries', 'sectors']
          depth = 2
  </code></pre>
  <p>urls</p>
  <pre><code>from . import views
  from rest_framework.routers import DefaultRouter
  
  
  router = DefaultRouter()
  router.register('op-filter', views.op_listView, basename='op-filter')
  urlpatterns = router.urls
  </code></pre>
  <p>my code does not work and says</p>
  <pre><code>  extra_actions = viewset.get_extra_actions()
  AttributeError: type object 'op_listView' has no attribute 'get_extra_actions
  </code></pre>
  <p>can anyone help me with the solution. you help is much appreciated.</p>