Methode str pour les jeux
This commit is contained in:
parent
ea343c6988
commit
b6872525c3
|
@ -24,6 +24,9 @@ class Emprunt(models.Model):
|
|||
permanencier_emprunt = models.ForeignKey('users.User', on_delete=models.PROTECT, related_name='user_permanencier_emprunt')
|
||||
permanencier_rendu = models.ForeignKey('users.User', on_delete=models.PROTECT, related_name='user_permanencier_rendu', blank=True, null=True)
|
||||
|
||||
def __str__(self):
|
||||
return str(self.media) + str(self.user)
|
||||
|
||||
|
||||
class Jeu(models.Model):
|
||||
DUREE = (
|
||||
|
@ -42,4 +45,5 @@ class Jeu(models.Model):
|
|||
nombre_joueurs_max = models.IntegerField(validators=[MinValueValidator(1)])
|
||||
comment = models.CharField(help_text="Commentaire", max_length=255, blank=True, null=True)
|
||||
|
||||
|
||||
def __str__(self):
|
||||
return str(self.nom)
|
||||
|
|
Loading…
Reference in New Issue