Commit b6872525 authored by Mediatek's avatar Mediatek

Methode str pour les jeux

parent ea343c69
...@@ -23,6 +23,9 @@ class Emprunt(models.Model): ...@@ -23,6 +23,9 @@ class Emprunt(models.Model):
date_rendu = models.DateTimeField(help_text='%d/%m/%y %H:%M:%S', blank=True, null=True) date_rendu = models.DateTimeField(help_text='%d/%m/%y %H:%M:%S', blank=True, null=True)
permanencier_emprunt = models.ForeignKey('users.User', on_delete=models.PROTECT, related_name='user_permanencier_emprunt') 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) 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): class Jeu(models.Model):
...@@ -42,4 +45,5 @@ class Jeu(models.Model): ...@@ -42,4 +45,5 @@ class Jeu(models.Model):
nombre_joueurs_max = models.IntegerField(validators=[MinValueValidator(1)]) nombre_joueurs_max = models.IntegerField(validators=[MinValueValidator(1)])
comment = models.CharField(help_text="Commentaire", max_length=255, blank=True, null=True) 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