          Because of the way class based views create a closure around the
          instantiated view, we need to totally reimplement `.as_view`,
          and slightly modify the view function that is created and returned.
          """
          # The suffix initkwarg is reserved for identifying the viewset type
          # eg. 'List' or 'Instance'.
          cls.suffix = None
  
          # actions must not be empty
          if not actions:
 
</s> remove                 view = viewset.as_view(mapping, **route.initkwargs)
 </s> add                 initkwargs = route.initkwargs.copy()
                initkwargs.update({
                    'basename': basename,
                })

                view = viewset.as_view(mapping, **initkwargs)
        # The suffix initkwarg is reserved for displaying the viewset type.
          Because of the way class based views create a closure around the
          instantiated view, we need to totally reimplement `.as_view`,
          and slightly modify the view function that is created and returned.
          """
        # The suffix initkwarg is reserved for displaying the viewset type.
          # eg. 'List' or 'Instance'.
          cls.suffix = None
  
          # actions must not be empty
          if not actions:
keep keep keep keep replace keep keep keep keep keep
 Add '.basename' and '.reverse_action()' to ViewSet (#5648)

* Router sets 'basename' on ViewSet

* Add 'ViewSet.reverse_action()' method

* Test router setting initkwargs 
rest_framework/viewsets.py