      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):
 
</s> remove                 ret = OrderedDict()
 </s> add                 ret = SortedDict() </s> remove from collections import namedtuple, OrderedDict
 </s> add from collections import namedtuple
        api_root_dict = SortedDict()
      def get_api_root_view(self):
          """
          Return a view to use as the API root.
          """
        api_root_dict = SortedDict()
          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):
keep keep keep keep replace keep keep keep keep keep
 Used Django utils SortedDict instead of stdlib's OrderedDict for
wider compatability. 
rest_framework/routers.py