Show if a account is not training on the character list

This commit is contained in:
2011-05-31 12:37:02 +01:00
parent b11cc15c0b
commit 74735edbdc
2 changed files with 5 additions and 1 deletions

View File

@@ -33,6 +33,10 @@ class EVEAccount(EVEAPIModel):
def in_corp(self, corpid):
return self.character.filter(corporation__id=corpid).count()
@property
def training(self):
return self.characters.filter(eveplayercharacterskill__in_training__gt=0).count()
class Meta:
app_label = 'eve_api'
verbose_name = 'EVE Account'