Commit b6872525 authored by Mediatek's avatar Mediatek

Methode str pour les jeux

parent ea343c69
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment