diff --git a/apps/tbde/models.py b/apps/tbde/models.py index 82d8d63..1fdbc64 100644 --- a/apps/tbde/models.py +++ b/apps/tbde/models.py @@ -15,6 +15,9 @@ class Ticket(models.Model): verbose_name=_("note") ) + def __str__(self): + return "n°" + str(self.number) + " : " + str(self.note) + class Reward(models.Model): order = models.PositiveIntegerField( @@ -33,5 +36,10 @@ class Reward(models.Model): rewarded_by = models.ForeignKey( Ticket, on_delete=models.PROTECT, - verbose_name=_("rewarded by") + null=True, + blank=True, + verbose_name=_("rewarded by"), ) + + def __str__(self): + return str(self.order) + " - " + str(self.name)