From 017ac3479294fe637ba62bb33779181a0fd1c648 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Mon, 24 Dec 2018 11:18:26 -0500 Subject: [PATCH] Enable JSON for the games view as well. --- xonstat/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xonstat/__init__.py b/xonstat/__init__.py index 54b0ffc..8646c02 100644 --- a/xonstat/__init__.py +++ b/xonstat/__init__.py @@ -141,7 +141,10 @@ def main(global_config, **settings): config.add_view(game_info_json, route_name="game_info_json", renderer="jsonp") config.add_route("game_index", "/games") - config.add_view(game_finder, route_name="game_index", renderer="game_finder.mako") + config.add_view(game_finder, route_name="game_index", accept="text/html", + renderer="game_finder.mako") + config.add_view(game_finder_json, route_name="game_index", accept="application/json", + renderer="json") config.add_route("game_index_json", "/games.json") config.add_view(game_finder_json, route_name="game_index_json", renderer="jsonp") -- 2.39.2