mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 23:02:19 +00:00
Now shows actual race/gender values in character profile
This commit is contained in:
@@ -76,6 +76,20 @@ class EVEPlayerCharacter(EVEAPIModel):
|
|||||||
|
|
||||||
objects = EVEPlayerCharacterManager()
|
objects = EVEPlayerCharacterManager()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def gender_description():
|
||||||
|
for va in API_GENDER_CHOICES:
|
||||||
|
k, v = va
|
||||||
|
if v == self.gender:
|
||||||
|
return k
|
||||||
|
|
||||||
|
@property
|
||||||
|
def race_description():
|
||||||
|
for va in API_RACES_CHOICES:
|
||||||
|
k, v = va
|
||||||
|
if v == self.race:
|
||||||
|
return k
|
||||||
|
|
||||||
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)
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
<img src="http://img.eve.is/serv.asp?s=256&c={{ character.id }}"/>
|
<img src="http://img.eve.is/serv.asp?s=256&c={{ character.id }}"/>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Race: {{ character.race }}</li>
|
<li>Race: {{ character.race_description }}</li>
|
||||||
<li>Gender: {{ character.gender }}</li>
|
<li>Gender: {{ character.gender_description }}</li>
|
||||||
<li>Corporation: {{ character.corporation.name }}</li>
|
<li>Corporation: {{ character.corporation.name }}</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user