title: Setting up router with APIView and viewset in Django Rest Framework
body: <p>It's my first question on Stackoverflow !</p>
  
  <p>I'm new to Django and following some tutorials.</p>
  
  <p>I'm trying to understand if there is a way to set up the routing of an API from different view classes like APIView and viewsets.ModelViewSet (please tell me if I do not use the good wording)</p>
  
  <p><strong>In views I have :</strong></p>
  
  <pre><code>from rest_framework import viewsets
  from post.models import UniquePost
  from .serializers import UniquePostSerializers
  from rest_framework.views import APIView
  
  class UniquePostViewSet(viewsets.ModelViewSet):
      serializer_class = UniquePostSerializers
      queryset = UniquePost.objects.all()
  
  class FileUploadView(APIView):
       some code here but no queryset nor serialized data...and no model
  </code></pre>
  
  <p><strong>In urls I have :</strong></p>
  
  <pre><code>from post.api.views import UniquePostViewSet
  from django.urls import path, include
  from rest_framework.routers import DefaultRouter
  
  from post.api.views import FileUploadView
  
  router = DefaultRouter()
  router.register('UniquePost', UniquePostViewSet, base_name='uniquepostitem')
  router.register('demo', FileUploadView, base_name='file-upload-demo')
  urlpatterns = router.urls
  </code></pre>
  
  <p>But it seems that I can register FileUploadView this way. Because I don't have a queryset to render.</p>
  
  <p>I have : AttributeError: type object 'FileUploadView' has no attribute 'get_extra_actions'</p>
  
  <p>I realized that (well I think) that I can use <code>APIView</code> for <code>FileUploadView</code> (and add "<code>.as_view()</code>) but I think I have to rewrite <code>UniquePostViewSet</code> using <code>APIView</code> as well and defining exactly what I want to see in details like POST, PUT etc...</p>
  
  <p>My question is : Is there a way to use <code>DefaultRouter</code> <code>router.register</code> and insert a view that inherit from <code>APIView</code> (and a view that inherit from <code>viewsets.ModelViewset</code>) at the same time ?</p>
  
  <p>Hope all of this is clear and thank you so much for your help !!!</p>