]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Add a __repr__ to RecentGames for easy debugging.
authorAnt Zucaro <azucaro@gmail.com>
Sun, 23 Dec 2012 17:43:26 +0000 (12:43 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Sun, 23 Dec 2012 17:43:26 +0000 (12:43 -0500)
xonstat/views/helpers.py

index 1affe0dc6df0f9b50e560245c77ee711329def4b..3e09e08db265bec6c254e7c836c56e456fe6a6fa 100644 (file)
@@ -68,6 +68,9 @@ class RecentGame(object):
             "elo_delta": self.elo_delta,
             }
 
+    def __repr__(self):
+        return "<RecentGame(id=%s, gametype=%s, server=%s, map=%s)>" % (self.game_id, self.game_type_cd, self.server_name, self.map_name)
+
 
 def recent_games_q(server_id=None, map_id=None, player_id=None, cutoff=None):
     '''