# Note: the default is true
xonstat.verify_requests = false
-# similar to the above variables, but for server-specific views
-
-# how far back to go when fetching server statistics
-xonstat.servers.leaderboard_lifetime = 30
-
-# how many entries on the leaderboard to show
-xonstat.servers.leaderboard_count = 10
-
-# how many server entries to show per page
-xonstat.servers.index_count = 20
-
-# how many recent games to show
-xonstat.servers.recent_games_count = 20
-
##### END XONSTAT CONFIG SETTINGS #####
[pipeline:main]
xonstat.minimum_required_players = 2
xonstat.leaderboard_lifetime = 7
xonstat.verify_requests = true
-xonstat.servers.leaderboard_lifetime = 30
-xonstat.servers.leaderboard_count = 10
-xonstat.servers.index_count = 20
-xonstat.servers.recent_games_count = 20
[filter:weberror]
use = egg:WebError#error_catcher
from collections import namedtuple
from datetime import datetime, timedelta
from pyramid.httpexceptions import HTTPNotFound
-from pyramid.registry import Registry
from sqlalchemy import func as fg
from webhelpers.paginate import Page
from xonstat.models import DBSession, Player, Server, Map, Game, PlayerGameStat
# Defaults
-settings = Registry.settings
-LEADERBOARD_LIFETIME = int(settings.get("xonstat.servers.leaderboard_lifetime", 30))
-LEADERBOARD_COUNT = int(settings.get("xonstat.servers.leaderboard_count", 10))
-INDEX_COUNT = int(settings.get("xonstat.servers.index_count", 20))
-RECENT_GAMES_COUNT = int(settings.get("xonstat.servers.recent_games_count", 20))
+LEADERBOARD_LIFETIME = 30
+LEADERBOARD_COUNT = 10
+INDEX_COUNT = 20
+RECENT_GAMES_COUNT = 20
class ServerIndex(object):