]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/__init__.py
Add separate views for the top servers on a map.
[xonotic/xonstat.git] / xonstat / __init__.py
index 72e849d89ec45b6b6530097e287b683c491ee505..f1e3571b8b47413453c03e1586ee9e6c19e22a10 100644 (file)
@@ -173,6 +173,12 @@ def main(global_config, **settings):
     config.add_view(view=MapTopPlayers, route_name="map_top_active", attr="json",
                     renderer="json", accept="application/json")
 
+    config.add_route("map_top_servers", "/map/{id:\d+}/topservers")
+    config.add_view(view=MapTopServers, route_name="map_top_servers", attr="html",
+                    renderer="map_top_servers.mako", accept="text/html")
+    config.add_view(view=MapTopServers, route_name="map_top_servers", attr="json",
+                    renderer="json", accept="application/json")
+
     config.add_route("map_info",      "/map/{id:\d+}")
     config.add_view(map_info,      route_name="map_info",      renderer="map_info.mako")