  class DynamicListAndDetailViewSet(viewsets.ViewSet):
      def list(self, request, *args, **kwargs):
          return Response({'method': 'list'})
  
      @list_route(methods=['post'])
      def list_route_post(self, request, *args, **kwargs):
          return Response({'method': 'action1'})
  
      @detail_route(methods=['post'])
      def detail_route_post(self, request, *args, **kwargs):
 
</s> remove     @detail_route(methods=['post'])
 </s> add     @action(methods=['post'], detail=True) </s> remove     @detail_route(methods=['post'])
 </s> add     @action(methods=['post'], detail=True) </s> remove     @detail_route(methods=['post'])
 </s> add     @action(methods=['post'], detail=True) </s> remove     @list_route()
 </s> add     @action(detail=False) </s> remove     @detail_route(methods=['post', 'delete'])
 </s> add     @action(methods=['post', 'delete'], detail=True)
    @action(methods=['post'], detail=False)
  class DynamicListAndDetailViewSet(viewsets.ViewSet):
      def list(self, request, *args, **kwargs):
          return Response({'method': 'list'})
  
    @action(methods=['post'], detail=False)
      def list_route_post(self, request, *args, **kwargs):
          return Response({'method': 'action1'})
  
      @detail_route(methods=['post'])
      def detail_route_post(self, request, *args, **kwargs):
keep keep keep keep replace keep keep keep keep keep
 Rework dynamic list/detail actions (#5705)

* Merge list/detail route decorators into 'action'

* Merge dynamic routes, add 'detail' attribute

* Add 'ViewSet.get_extra_actions()'

* Refactor dynamic route checking & collection

* Refactor dynamic route generation

* Add 'ViewSet.detail' initkwarg

* Fixup schema test

* Add release notes for dynamic action changes

* Replace list/detail route decorators in tests

* Convert tabs to spaces in router docs

* Update docs

* Make 'detail' a required argument of 'action'

* Improve router docs 
tests/test_routers.py