def resource_list(name):
 def make_responder(list_all):
  def responder():
   return app.response_class(json_generator(list_all(), root=name, expand=is_expand()), mimetype='application/json')
  responder.__name__ = 'all_{0}'.format(name)
  return responder
 return make_responder

def resource_list ( name ) : def make_responder ( list_all ) : def responder ( ) : return app . response_class ( json_generator ( list_all ( ) , root = name , expand = is_expand ( ) ) , mimetype = 'application/json' ) responder . __name__ = 'all_{0}' . format ( name ) return responder return make_responder
decorates a function to handle restful http request for a list of resources .