          return func
      return decorator
  
  
  def detail_route(methods=None, **kwargs):
      """
      Used to mark a method on a ViewSet that should be routed for detail requests.
      """
      methods = ['get'] if (methods is None) else methods
  
 
</s> remove     Used to mark a method on a ViewSet that should be routed for detail requests.
 </s> add     Mark a ViewSet method as a routable action.

    Set the `detail` boolean to determine if this action should apply to
    instance/detail requests or collection/list requests. </s> remove     methods = ['get'] if (methods is None) else methods

    def decorator(func):
        func.bind_to_methods = methods
        func.detail = False
        func.kwargs = kwargs
        return func
    return decorator
 </s> add     warnings.warn(
        "`list_route` is pending deprecation and will be removed in 3.10 in favor of "
        "`action`, which accepts a `detail` bool. Use `@action(detail=False)` instead.",
        PendingDeprecationWarning, stacklevel=2
    )
    return action(methods, detail=False, **kwargs) </s> remove         func.detail = True
 </s> add         func.detail = detail
        func.url_path = url_path or func.__name__
        func.url_name = url_name or func.__name__.replace('_', '-')
def action(methods=None, detail=None, url_path=None, url_name=None, **kwargs):
          return func
      return decorator
  
  
def action(methods=None, detail=None, url_path=None, url_name=None, **kwargs):
      """
      Used to mark a method on a ViewSet that should be routed for detail requests.
      """
      methods = ['get'] if (methods is None) else methods
  
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 
rest_framework/decorators.py