def list_route(methods=None, **kwargs):
    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
Used to mark a method on a ViewSet that should be routed for list requests.
dataset/ETHPy150Open tomchristie/django-rest-framework/rest_framework/decorators.py/list_route