]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/views/game.py
Provide an option to show elo deltas on the game info page.
[xonotic/xonstat.git] / xonstat / views / game.py
index 2e088b8616282f28ff47bfcc1f5c614e6341d0ec..f9389e0bc10821a4c73aae68324c96ee44b625c1 100644 (file)
@@ -55,6 +55,12 @@ def game_index_json(request):
 
 def _game_info_data(request):
     game_id = request.matchdict['id']
+
+    if request.params.has_key('show_elo'):
+        show_elo = True
+    else:
+        show_elo = False
+
     try:
         notfound = False
 
@@ -104,6 +110,7 @@ def _game_info_data(request):
         pgstats = None
         pwstats = None
         captimes = None
+        show_elo = False
         raise inst
 
     return {'game':game,
@@ -112,6 +119,7 @@ def _game_info_data(request):
             'pgstats':pgstats,
             'pwstats':pwstats,
             'captimes':captimes,
+            'show_elo':show_elo,
             }