From 6d7703c75a7611cf49b7ca5cf30a8c16164f6533 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Tue, 1 Oct 2013 20:52:14 -0400 Subject: [PATCH] Remove the player damage view. It was just used for testing! --- xonstat/__init__.py | 3 --- xonstat/views/__init__.py | 2 +- xonstat/views/player.py | 25 ++----------------------- 3 files changed, 3 insertions(+), 27 deletions(-) diff --git a/xonstat/__init__.py b/xonstat/__init__.py index f75ab71..1c80afb 100644 --- a/xonstat/__init__.py +++ b/xonstat/__init__.py @@ -78,9 +78,6 @@ def main(global_config, **settings): config.add_route("player_captimes_json", "/player/{id:\d+}/captimes.json") config.add_view(player_captimes_json, route_name="player_captimes_json", renderer="jsonp") - config.add_route("nvd3_damage", "/player/{id:\d+}/damage") - config.add_view(player_nvd3_damage, route_name="nvd3_damage", renderer="nvd3_damage.mako") - config.add_route("player_weaponstats_data_json", "/player/{id:\d+}/weaponstats.json") config.add_view(player_weaponstats_data_json, route_name="player_weaponstats_data_json", renderer="jsonp") diff --git a/xonstat/views/__init__.py b/xonstat/views/__init__.py index 38f5275..a71c29d 100644 --- a/xonstat/views/__init__.py +++ b/xonstat/views/__init__.py @@ -7,7 +7,7 @@ from xonstat.views.player import player_damage_json from xonstat.views.player import player_elo_info_text, player_elo_info_json from xonstat.views.player import player_hashkey_info_text, player_hashkey_info_json from xonstat.views.player import player_captimes, player_captimes_json -from xonstat.views.player import player_nvd3_damage, player_weaponstats_data_json +from xonstat.views.player import player_weaponstats_data_json from xonstat.views.game import game_info, rank_index from xonstat.views.game import game_info_json, rank_index_json diff --git a/xonstat/views/player.py b/xonstat/views/player.py index ba8cf0d..41217e5 100644 --- a/xonstat/views/player.py +++ b/xonstat/views/player.py @@ -1030,36 +1030,15 @@ def player_captimes_data(request): 'player':player, } + def player_captimes(request): return player_captimes_data(request) + def player_captimes_json(request): return player_captimes_data(request) -def player_nvd3_damage(request): - player_id = int(request.matchdict['id']) - if player_id <= 2: - player_id = -1; - - game_type_cd = request.params.get("game_type", None) - if game_type_cd == "overall": - game_type_cd = None - - limit = 20 - if request.params.has_key("limit"): - limit = int(request.params["limit"]) - - if limit < 0: - limit = 20 - if limit > 50: - limit = 50 - - return { "player_id": player_id, - "game_type_cd": game_type_cd, - "limit": limit, - } - def player_weaponstats_data_json(request): player_id = request.matchdict["id"] if player_id <= 2: -- 2.39.2