From 323bbe0161d14c206f27744f0ab46f03cc0e2db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gl=C3=BCpker?= Date: Fri, 23 Mar 2018 22:27:20 +0100 Subject: Introduce new page with serverinfo --- main.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'main.py') diff --git a/main.py b/main.py index 7577d2d..9ae9b54 100755 --- a/main.py +++ b/main.py @@ -168,6 +168,19 @@ def premades(): connections=connections ) +@app.route("/server", methods=['GET']) +def server(): + with open(os.path.join(CONFIG, 'server.json'), 'rt') as config: + servers = json.load(config) + for name, server in servers.items(): + server['data'] = QueryServer.QueryServer(server['ip'], server['port'], server['gameid']) + return render_template('server_html.jinja', + servers=servers + # profiles=premadedata, + # display_time=display_time, + # connections=connections + ) + if __name__ == '__main__': # print(steam.getFriends("76561197963063991")) # print(steam.getFriends("76561197963882989")) -- cgit v1.2.3