mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-15 07:12:16 +00:00
Remove unneeded lookup functions, use the builtin ones
This commit is contained in:
@@ -43,25 +43,3 @@ API_BLOODLINES_CHOICES = (
|
|||||||
(12, 'Ni-Kunni'),
|
(12, 'Ni-Kunni'),
|
||||||
(13, 'Caldari'),
|
(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,
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -90,18 +90,6 @@ class EVEPlayerCharacter(EVEAPIModel):
|
|||||||
|
|
||||||
objects = EVEPlayerCharacterManager()
|
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):
|
def __unicode__(self):
|
||||||
if self.name:
|
if self.name:
|
||||||
return "%s (%d)" % (self.name, self.id)
|
return "%s (%d)" % (self.name, self.id)
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Race: {{ character.race_description }}</li>
|
<li>Race: {{ character.get_race_display }}</li>
|
||||||
<li>Gender: {{ character.gender_description }}</li>
|
<li>Gender: {{ character.get_gender_display }}</li>
|
||||||
<li>Corporation: {{ character.corporation.name }}</li>
|
<li>Corporation: {{ character.corporation.name }}</li>
|
||||||
<li>Alliance: {{ character.corporation.alliance.name }}</li>
|
<li>Alliance: {{ character.corporation.alliance.name }}</li>
|
||||||
<li>Total SP: {{ character.total_sp|intcomma }}</li>
|
<li>Total SP: {{ character.total_sp|intcomma }}</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user