]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/views/map.py
Fix broken things in game_index.
[xonotic/xonstat.git] / xonstat / views / map.py
index 4c65a2d45a44ecfe29be115c85d7aa1607c3f9a3..cd6f80fb4e849784057f75eb5f0dc1f617e33b22 100644 (file)
@@ -3,8 +3,7 @@ import sqlalchemy.sql.functions as func
 import sqlalchemy.sql.expression as expr
 from collections import namedtuple
 from datetime import datetime, timedelta
-from sqlalchemy import desc
-from webhelpers.paginate import Page, PageURL
+from webhelpers.paginate import Page
 from xonstat.models import *
 from xonstat.util import page_url, html_colors
 from xonstat.views.helpers import RecentGame, recent_games_q
@@ -21,7 +20,7 @@ def _map_index_data(request):
         map_q = DBSession.query(Map).\
                 order_by(Map.map_id.desc())
 
-        maps = Page(map_q, current_page, items_per_page=10, url=page_url)
+        maps = Page(map_q, current_page, items_per_page=25, url=page_url)
 
     except Exception as e:
         maps = None
@@ -119,7 +118,8 @@ def _map_info_data(request):
                 filter(PlayerCaptime.map_id == map_id).\
                 filter(Player.player_id == PlayerCaptime.player_id).\
                 order_by(PlayerCaptime.fastest_cap).\
-                limit(10).all()
+                limit(25).\
+                all()
 
         captimes = [Captime(c.player_id, html_colors(c.nick),
             c.fastest_cap, c.game_id) for c in captimes_raw]