                  for httpmethods, methodname in detail_routes:
                      initkwargs = route.initkwargs.copy()
                      initkwargs.update(getattr(viewset, methodname).kwargs)
                      ret.append(Route(
                          key=route.key,
                          url=replace_methodname(route.url, methodname),
                          mapping=dict((httpmethod, methodname) for httpmethod in httpmethods),
                          name=replace_methodname(route.name, methodname),
                          initkwargs=initkwargs,
                      ))
 
</s> remove                         key=route.key,
 </s> add  </s> remove             elif route.key == 'collection':
 </s> add             elif isinstance(route, DynamicListRoute): </s> remove             if route.key == 'dynamic':
 </s> add             if isinstance(route, DynamicDetailRoute): </s> remove         known_actions = flatten([route.mapping.values() for route in self.routes])
 </s> add         known_actions = flatten([route.mapping.values() for route in self.routes if isinstance(route, Route)]) </s> remove Route = namedtuple('Route', ['key', 'url', 'mapping', 'name', 'initkwargs'])
 </s> add Route = namedtuple('Route', ['url', 'mapping', 'name', 'initkwargs'])
DynamicDetailRoute = namedtuple('DynamicDetailRoute', ['url', 'name', 'initkwargs'])
DynamicListRoute = namedtuple('DynamicListRoute', ['url', 'name', 'initkwargs'])
                  for httpmethods, methodname in detail_routes:
                      initkwargs = route.initkwargs.copy()
                      initkwargs.update(getattr(viewset, methodname).kwargs)
                      ret.append(Route(

                          url=replace_methodname(route.url, methodname),
                          mapping=dict((httpmethod, methodname) for httpmethod in httpmethods),
                          name=replace_methodname(route.name, methodname),
                          initkwargs=initkwargs,
                      ))
keep keep keep keep replace keep keep keep keep keep
 Introduce DynamicDetailRoute and DynamicListRoute to distinguish between different route types 
rest_framework/routers.py