From c49f227e66f06af13fc76a39e9b74511a8e70e11 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Sat, 7 Aug 2010 13:02:08 +0100 Subject: [PATCH] Remove unneeded lookup functions, use the builtin ones --- eve_api/app_defines.py | 22 ---------------------- eve_api/models/api_player.py | 12 ------------ templates/sso/character.html | 4 ++-- 3 files changed, 2 insertions(+), 36 deletions(-) diff --git a/eve_api/app_defines.py b/eve_api/app_defines.py index 48e5905..a8fd30f 100644 --- a/eve_api/app_defines.py +++ b/eve_api/app_defines.py @@ -43,25 +43,3 @@ API_BLOODLINES_CHOICES = ( (12, 'Ni-Kunni'), (13, 'Caldari'), ) - -API_RACES = { - 'Caldari': 1, - 'Minmatar': 2, - 'Gallente': 3, - 'Amarr': 4, -} - -API_BLOODLINES = { - 'Sebiestor': 1, - 'Vherokior': 2, - 'Brutor': 3, - 'Intaki': 4, - 'Gallente': 5, - 'Jin-Mei': 6, - 'Civire': 7, - 'Deteis': 8, - 'Achura': 9, - 'Amarr': 10, - 'Khanid': 11, - 'Ni-Kunni': 12, -} diff --git a/eve_api/models/api_player.py b/eve_api/models/api_player.py index 8a0b7d1..9c27899 100644 --- a/eve_api/models/api_player.py +++ b/eve_api/models/api_player.py @@ -90,18 +90,6 @@ class EVEPlayerCharacter(EVEAPIModel): objects = EVEPlayerCharacterManager() - @property - def gender_description(self): - for choice in API_GENDER_CHOICES: - if choice[0] == self.gender: - return choice[1] - - @property - def race_description(self): - for choice in API_RACES_CHOICES: - if choice[0] == self.race: - return choice[1] - def __unicode__(self): if self.name: return "%s (%d)" % (self.name, self.id) diff --git a/templates/sso/character.html b/templates/sso/character.html index 305a8f0..2bd4d20 100644 --- a/templates/sso/character.html +++ b/templates/sso/character.html @@ -12,8 +12,8 @@