import logging
import math
import sqlalchemy
-import sqlalchemy.sql.functions as func
+import sqlalchemy.sql.functions as sfunc
from datetime import timedelta
from sqlalchemy.orm import mapper
from sqlalchemy.orm import scoped_session
# we do not have the actual duration of the game, so use the
# maximum alivetime of the players instead
duration = 0
- for d in session.query(func.max(PlayerGameStat.alivetime)).\
+ for d in session.query(sfunc.max(PlayerGameStat.alivetime)).\
filter(PlayerGameStat.game_id==self.game_id).\
one():
duration = d.seconds
from pyramid.response import Response
from sqlalchemy import desc
from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
-from sqlalchemy.sql import func
+from sqlalchemy import func
from xonstat.models import *
from xonstat.util import strip_colors, qfont_decode
from xonstat.util import page_url, html_colors