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

@@ -29,14 +29,18 @@ class EVEPlayerCorporation(EVEAPIModel):
group = models.ForeignKey(Group, blank=True, null=True)
@models.permalink
def get_absolute_url(self):
return ('eveapi-corporation', [self.pk])
class Meta:
app_label = 'eve_api'
verbose_name = 'Player Corporation'
verbose_name_plural = 'Player Corporations'
def __str__(self):
def __unicode__(self):
if self.name:
return self.name
else:
return "Corp #%d" % self.id
return u"Corp #%d" % self.id