class MyRouter(routers.DefaultRouter):

    def get_api_root_view(self):
        """
        Return a view to use as the API root.
        """
api_root_dict = OrderedDict()
list_name = self.routes[0].name
for prefix, viewset, basename in self.registry:
    api_root_dict[prefix] = list_name.format(basename=basename)


class APIRoot(views.APIView):
    _ignore_model_permissions = True

def get(self, request, *args, **kwargs):
    ret = OrderedDict()
namespace = request.resolver_match.namespace
for key, url_name in list(api_root_dict.items()):
    if namespace:
        url_name = namespace + ':' + url_name
try:
    ret[key] = reverse(url_name, args=args, kwargs=kwargs, request=request,
        format=kwargs.get('format', None))
except NoReverseMatch:
    continue
ret['book-featured-list'] = '%s%s' % (ret['books'], 'featured/')
return Response(ret)
return APIRoot.as_view()
Include list_route methods in Django REST framework's API root