mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
Set string representation for UserProfile & SecurityQuestionAnswer models
Makes the admin pages a bit more useful for debugging. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
02a5113bdd
commit
40c728181a
|
@ -882,12 +882,18 @@ class UserProfile(models.Model):
|
||||||
user = models.OneToOneField(User)
|
user = models.OneToOneField(User)
|
||||||
answer_attempts = models.IntegerField(default=0)
|
answer_attempts = models.IntegerField(default=0)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return '%s' % (self.user)
|
||||||
|
|
||||||
|
|
||||||
class SecurityQuestionAnswer(models.Model):
|
class SecurityQuestionAnswer(models.Model):
|
||||||
user = models.ForeignKey(UserProfile, on_delete=models.CASCADE)
|
user = models.ForeignKey(UserProfile, on_delete=models.CASCADE)
|
||||||
security_question = models.ForeignKey(SecurityQuestion)
|
security_question = models.ForeignKey(SecurityQuestion)
|
||||||
answer = models.CharField(max_length = 250, null=False)
|
answer = models.CharField(max_length = 250, null=False)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return '%s - %s' % (self.user, self.security_question)
|
||||||
|
|
||||||
|
|
||||||
class PatchDisposition(models.Model):
|
class PatchDisposition(models.Model):
|
||||||
PATCH_DISPOSITION_CHOICES = (
|
PATCH_DISPOSITION_CHOICES = (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user