def detail_route(methods=None, **kwargs):
    """
    Used to mark a method on a ViewSet that should be routed for detail requests.

    :param methods: An iterable of strings representing the HTTP (GET, POST, etc.) methods accepted by the route.
    :param url_path: Replaces the route automatically generated by the ViewSetRouter for the decorated method
                     with the value provided.
    """
    methods = ['get'] if (methods is None) else methods

    def decorator(func):
        func.bind_to_methods = methods
        func.detail = True
        func.kwargs = kwargs

        return func

    return decorator


def list_route(methods=None, **kwargs):
    """
    Used to mark a method on a ViewSet that should be routed for list requests.

    :param methods: An iterable of strings representing the HTTP (GET, POST, etc.) methods accepted by the route.
    :param url_path: Replaces the route automatically generated by the ViewSetRouter for the decorated method
                     with the value provided.
    """

    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
