original_docstring: 
          Iterate through all resources registered with this router
          and create a list endpoint and a detail endpoint for each one.
          Uses the router name as prefix and endpoint name of the resource when registered, to assemble the url pattern.
          Uses the constructor-passed url method or class for generating urls
          
docstring: Iterate through all resources registered with this router
  and create a list endpoint and a detail endpoint for each one.
  Uses the router name as prefix and endpoint name of the resource when registered, to assemble the url pattern.
  Uses the constructor-passed url method or class for generating urls
docstring_tokens: Iterate through all resources registered with this router and create a list endpoint and a detail endpoint for each one . Uses the router name as prefix and endpoint name of the resource when registered to assemble the url pattern . Uses the constructor - passed url method or class for generating urls
code: def urls_old(self, protocol=Resource.Protocol.http):
          '''
          Iterate through all resources registered with this router
          and create a list endpoint and a detail endpoint for each one.
          Uses the router name as prefix and endpoint name of the resource when registered, to assemble the url pattern.
          Uses the constructor-passed url method or class for generating urls
          '''
          url_patterns = []
          for endpoint, resource_class in self._registry.items():
              setattr(resource_class, 'api_name', self.name)
              setattr(resource_class, 'resource_name', endpoint)
              # append any nested resources the resource may have
              nested = []
              for route in resource_class.nested_routes('/%s/%s/' % (self.name, endpoint)):
                  route = route._replace(handler=resource_class.wrap_handler(route.handler, protocol))
                  nested.append(route)
  
              url_patterns.extend(nested)
              # append resource as list
              url_patterns.append(Route(
                  path='/%s/%s/' % (self.name, endpoint),
                  handler=resource_class.as_list(protocol),
                  methods=resource_class.route_methods(),
                  name='{}_{}_list'.format(self.name, endpoint).replace('/', '_')
              ))
              # append resource as detail
              url_patterns.append(Route(
                  path='/%s/%s/%s/' % (self.name, endpoint, resource_class.route_param('pk')),
                  handler=resource_class.as_detail(protocol),
                  methods=resource_class.route_methods(),
                  name='{}_{}_detail'.format(self.name, endpoint).replace('/', '_')
              ))
          return url_patterns
code_tokens: def urls_old ( self , protocol = Resource . Protocol . http ) : url_patterns = [ ] for endpoint , resource_class in self . _registry . items ( ) : setattr ( resource_class , 'api_name' , self . name ) setattr ( resource_class , 'resource_name' , endpoint ) nested = [ ] for route in resource_class . nested_routes ( '/%s/%s/' % ( self . name , endpoint ) ) : route = route . _replace ( handler = resource_class . wrap_handler ( route . handler , protocol ) ) nested . append ( route ) url_patterns . extend ( nested ) url_patterns . append ( Route ( path = '/%s/%s/' % ( self . name , endpoint ) , handler = resource_class . as_list ( protocol ) , methods = resource_class . route_methods ( ) , name = '{}_{}_list' . format ( self . name , endpoint ) . replace ( '/' , '_' ) ) ) url_patterns . append ( Route ( path = '/%s/%s/%s/' % ( self . name , endpoint , resource_class . route_param ( 'pk' ) ) , handler = resource_class . as_detail ( protocol ) , methods = resource_class . route_methods ( ) , name = '{}_{}_detail' . format ( self . name , endpoint ) . replace ( '/' , '_' ) ) ) return url_patterns
short_docstring: Iterate through all resources registered with this router
  and create a list endpoint and a detail endpoint for each one.
short_docstring_tokens: Iterate through all resources registered with this router and create a list endpoint and a detail endpoint for each one .
comment: '''
          Iterate through all resources registered with this router
          and create a list endpoint and a detail endpoint for each one.
          Uses the router name as prefix and endpoint name of the resource when registered, to assemble the url pattern.
          Uses the constructor-passed url method or class for generating urls
          '''$SEP$# append any nested resources the resource may have$SEP$# append resource as list$SEP$# append resource as detail