Added permalinks for chars/corp models

This commit is contained in:
2011-06-21 09:22:55 +01:00
parent ab95de756f
commit b1e904adb7
2 changed files with 10 additions and 2 deletions

View File

@@ -74,6 +74,10 @@ class EVEPlayerCharacter(EVEAPIModel):
return self.eveaccount_set.all()[0]
return None
@models.permalink
def get_absolute_url(self):
return ('eveapi-character', [self.pk])
def __unicode__(self):
if self.name:
return self.name