From ac7cd5670f2c13db894e5a66579cb0a5f164e56d Mon Sep 17 00:00:00 2001 From: Raynaldo Rivera Date: Thu, 16 Oct 2014 23:38:36 -0700 Subject: [PATCH] Added easy to read strings to the models --- authentication/models.py | 3 +++ eveonline/models.py | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/authentication/models.py b/authentication/models.py index e1f34c7b..862e91b2 100644 --- a/authentication/models.py +++ b/authentication/models.py @@ -13,3 +13,6 @@ class AuthServicesInfo(models.Model): main_char_id = models.CharField(max_length=64, default="") user = models.ForeignKey(User) + + def __str__(self): + return self.user.username \ No newline at end of file diff --git a/eveonline/models.py b/eveonline/models.py index 0a229dd0..59a36f72 100644 --- a/eveonline/models.py +++ b/eveonline/models.py @@ -13,8 +13,14 @@ class EveCharacter(models.Model): api_id = models.CharField(max_length=254) user = models.ForeignKey(User) + def __str__(self): + return self.character_name + class EveApiKeyPair(models.Model): api_id = models.CharField(max_length=254) api_key = models.CharField(max_length=254) user = models.ForeignKey(User) + + def __str__(self): + return self.user.username \ No newline at end of file