]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Flatten the lines a bit.
authorAnt Zucaro <azucaro@gmail.com>
Wed, 19 Oct 2016 00:21:35 +0000 (20:21 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Wed, 19 Oct 2016 00:21:35 +0000 (20:21 -0400)
xonstat/__init__.py

index 86024a0bdd6d0cf78e483f7e6d77b3f7c1cf4f76..4071dd50660fee610f5cdaf707d820880a6f6e49 100644 (file)
@@ -135,63 +135,28 @@ def main(global_config, **settings):
 
     # SERVER ROUTES
     config.add_route("server_index", "/servers")
-    config.add_view(
-        view=ServerIndex,
-        route_name="server_index",
-        attr="html",
-        renderer="server_index.mako",
-        accept="text/html"
-    )
-    config.add_view(
-        view=ServerIndex,
-        route_name="server_index",
-        attr="json",
-        renderer="json",
-        accept="text/json"
-    )
+    config.add_view(view=ServerIndex, route_name="server_index", attr="html",
+                    renderer="server_index.mako", accept="text/html")
+    config.add_view(view=ServerIndex, route_name="server_index", attr="json", renderer="json",
+                    accept="text/json")
 
     config.add_route("server_top_maps", "/server/{id:\d+}/topmaps")
-    config.add_view(
-        view=ServerTopMaps,
-        route_name="server_top_maps",
-        attr="json",
-        renderer="json",
-        accept="text/json"
-    )
+    config.add_view(view=ServerTopMaps, route_name="server_top_maps", attr="json", renderer="json",
+                    accept="text/json")
 
     config.add_route("server_top_players", "/server/{id:\d+}/topplayers")
-    config.add_view(
-        view=ServerTopPlayers,
-        route_name="server_top_players",
-        attr="json",
-        renderer="json",
-        accept="text/json"
-    )
+    config.add_view(view=ServerTopPlayers, route_name="server_top_players", attr="json",
+                    renderer="json", accept="text/json")
 
     config.add_route("server_top_scorers", "/server/{id:\d+}/topscorers")
-    config.add_view(
-        view=ServerTopScorers,
-        route_name="server_top_scorers",
-        attr="json",
-        renderer="json",
-        accept="text/json"
-    )
+    config.add_view(view=ServerTopScorers, route_name="server_top_scorers", attr="json",
+                    renderer="json", accept="text/json")
 
     config.add_route("server_info", "/server/{id:\d+}")
-    config.add_view(
-        view=ServerInfo,
-        route_name="server_info",
-        attr="html",
-        renderer="server_info.mako",
-        accept="text/html"
-    )
-    config.add_view(
-        view=ServerInfo,
-        route_name="server_info",
-        attr="json",
-        renderer="json",
-        accept="text/json"
-    )
+    config.add_view(view=ServerInfo, route_name="server_info", attr="html",
+                    renderer="server_info.mako", accept="text/html")
+    config.add_view(view=ServerInfo, route_name="server_info", attr="json", renderer="json",
+                    accept="text/json")
 
     # MAP ROUTES
     config.add_route("map_index",      "/maps")