- config.add_route("map_index", "/maps")
- config.add_view(map_index, route_name="map_index", renderer="map_index.mako")
-
- config.add_route("map_index_json", "/maps.json")
- config.add_view(map_index_json, route_name="map_index_json", renderer="jsonp")
+ config.add_route("map_index", "/maps")
+ config.add_view(view=MapIndex, route_name="map_index", attr="html",
+ renderer="map_index.mako", accept="text/html")
+ config.add_view(view=MapIndex, route_name="map_index", attr="json", renderer="json",
+ accept="application/json")
+
+ config.add_route("map_top_scorers", "/map/{id:\d+}/topscorers")
+ config.add_view(view=MapTopScorers, route_name="map_top_scorers", attr="html",
+ renderer="map_top_scorers.mako", accept="text/html")
+ config.add_view(view=MapTopScorers, route_name="map_top_scorers", attr="json",
+ renderer="json", accept="application/json")