mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Show if a account is not training on the character list
This commit is contained in:
@@ -33,6 +33,10 @@ class EVEAccount(EVEAPIModel):
|
|||||||
def in_corp(self, corpid):
|
def in_corp(self, corpid):
|
||||||
return self.character.filter(corporation__id=corpid).count()
|
return self.character.filter(corporation__id=corpid).count()
|
||||||
|
|
||||||
|
@property
|
||||||
|
def training(self):
|
||||||
|
return self.characters.filter(eveplayercharacterskill__in_training__gt=0).count()
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
app_label = 'eve_api'
|
app_label = 'eve_api'
|
||||||
verbose_name = 'EVE Account'
|
verbose_name = 'EVE Account'
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<table>
|
<table>
|
||||||
<tr><th>Character Name</th><th>Corporation</th><th>Alliance</th><th>Skillpoints</th><th>Training</th></tr>
|
<tr><th>Character Name</th><th>Corporation</th><th>Alliance</th><th>Skillpoints</th><th>Training</th></tr>
|
||||||
{% for acc in acc_list %}
|
{% for acc in acc_list %}
|
||||||
<tr><th colspan=5>Account {{ acc.grouper }}</th></tr>
|
<tr><th colspan=5>Account {{ acc.grouper }} {% if acc.grouper.training == 0 %}<font color="#F87217">(No Character Training)</font>{% endif %}</th></tr>
|
||||||
{% for char in acc.list %}
|
{% for char in acc.list %}
|
||||||
<tr><td><a href="{% url eveapi-character char.id %}">{{ char.name }}</a></td>
|
<tr><td><a href="{% url eveapi-character char.id %}">{{ char.name }}</a></td>
|
||||||
<td><a href="{% url eveapi-corporation char.corporation.id %}">{{ char.corporation }}</a></td>
|
<td><a href="{% url eveapi-corporation char.corporation.id %}">{{ char.corporation }}</a></td>
|
||||||
|
|||||||
Reference in New Issue
Block a user