title: In setting viewset, I got an error AttributeError: 'function' object has no attribute 'get_extra_actions'
body: <p>I'm learning DRF and feel confused a little now.<br>
  I set up <code>QuestionView</code> and <code>QuestionSerializer</code> like this.</p>
  
  <p><strong>views.py</strong> </p>
  
  <pre><code>class QuestionView(viewsets.ModelViewSet) :
      queryset = models.Question.objects.all()
      serializer_class = QuestionSerializer
  
      def list(self, request, *args, **kwargs):
          serializer = QuestionSerializer(models.Question.objects.all())
          return Response(serializer.data)
  </code></pre>
  
  <p><strong>serializer.py</strong></p>
  
  <pre><code>class QuestionSerializer(serializers.ModelSerializer):
      class Meta:
          model= Question
          fields= ("question_text", "owner", "pub_date")
  </code></pre>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>router = routers.DefaultRouter()
  router.register('profile', cebula_views.SettingView)
  router.register('question', cebula_views.QuestionView.as_view({
      'get':'list',
  
  }), 'userpage-question')
  
  urlpatterns = [
      ...
      url(r'^', include(router.urls)),
      ...
  ] 
  </code></pre>
  
  <blockquote>
    <p>File "C:\Users\1Sun\Cebula3\businessproject\urls.py", line 34, in
    
        url(r'^', include(router.urls)),   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\rest_framework\routers.py",
    line 101, in urls
        self._urls = self.get_urls()   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\rest_framework\routers.py",
    line 363, in get_urls
        urls = super(DefaultRouter, self).get_urls()   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\rest_framework\routers.py",
    line 261, in get_urls
        routes = self.get_routes(viewset)   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\rest_framework\routers.py",
    line 176, in get_routes
        extra_actions = viewset.get_extra_actions() AttributeError: 'function' object has no attribute 'get_extra_actions'</p>
  </blockquote>
  
  <p>In my opinion, It is that I should write <code>get_extra_actions</code> method in <code>QuestionView</code> class, If so, how I write that? like this?</p>
  
  <pre><code>def get_extra_actions() : 
      return  ???
  </code></pre>
  
  <p>If not, what is the problem?</p>
  
  <p><strong>[Edit]</strong></p>
  
  <p>when I erase .as_view() at the url part and write like <code>router.register('question', cebula_views.QuestionView, 'userpage-question')</code></p>
  
  <p>the error is</p>
  
  <blockquote>
    <p>Unhandled exception in thread started by .wrapper at 0x00000283172D3D08> Traceback (most
    recent call last):   File
    "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\autoreload.py",
    line 225, in wrapper
        fn(*args, **kwargs)   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\commands\runserver.py",
    line 120, in inner_run
        self.check(display_num_errors=True)   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\base.py",
    line 364, in check
        include_deployment_checks=include_deployment_checks,   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\base.py",
    line 351, in _run_checks
        return checks.run_checks(**kwargs)   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\registry.py",
    line 73, in run_checks
        new_errors = check(app_configs=app_configs)   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\urls.py",
    line 13, in check_url_config
        return check_resolver(resolver)   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\checks\urls.py",
    line 23, in check_resolver
        return check_method()   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py",
    line 397, in check
        for pattern in self.url_patterns:   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\functional.py",
    line 36, in <strong>get</strong>
        res = instance.<strong>dict</strong>[self.name] = self.func(instance)   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py",
    line 536, in url_patterns
        patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)   File
    "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\functional.py",
    line 36, in <strong>get</strong>
        res = instance.<strong>dict</strong>[self.name] = self.func(instance)   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\resolvers.py",
    line 529, in urlconf_module
        return import_module(self.urlconf_name)   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\importlib__init__.py",
    line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)   File "", line 994, in _gcd_import   File
    "", line 971, in _find_and_load   File
    "", line 955, in _find_and_load_unlocked 
    File "", line 665, in _load_unlocked<br>
    File "", line 678, in
    exec_module   File "", line 219, in
    _call_with_frames_removed   File "C:\Users\1Sun\Cebula3\businessproject\urls.py", line 31, in 
        url(r'^cebula/',include('cebula.urls',namespace='cebula')),   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\django\urls\conf.py",
    line 34, in include
        urlconf_module = import_module(urlconf_module)   File "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\importlib__init__.py",
    line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)   File "", line 994, in _gcd_import   File
    "", line 971, in _find_and_load   File
    "", line 955, in _find_and_load_unlocked 
    File "", line 665, in _load_unlocked<br>
    File "", line 678, in
    exec_module   File "", line 219, in
    _call_with_frames_removed   File "C:\Users\1Sun\Cebula3\cebula\urls.py", line 15, in 
        url(r'^question/$',views.QuestionView.as_view(),name='question'),   File
    "C:\Users\1Sun\AppData\Local\Programs\Python\Python36\lib\site-packages\rest_framework\viewsets.py",
    line 68, in as_view
        raise TypeError("The <code>actions</code> argument must be provided when " TypeError: The <code>actions</code> argument must be provided when calling
    <code>.as_view()</code> on a ViewSet. For example <code>.as_view({'get': 'list'})</code></p>
  </blockquote>