Methode str pour les jeux

This commit is contained in:
Med 2017-07-06 17:30:23 +02:00
parent ea343c6988
commit b6872525c3
1 changed files with 5 additions and 1 deletions

View File

@ -23,6 +23,9 @@ class Emprunt(models.Model):
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_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):
@ -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)