From 9a7304f5735a01fe0583607794059659f72c8270 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Wed, 23 Sep 2020 20:21:55 +0200 Subject: [PATCH] Add __str__ on Adhesion model --- users/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/users/models.py b/users/models.py index bdd5092..56fd01e 100644 --- a/users/models.py +++ b/users/models.py @@ -69,3 +69,6 @@ class Adhesion(models.Model): class Meta: verbose_name = _('membership year') verbose_name_plural = _('membership years') + + def __str__(self): + return f"{self.starting_in} - {self.ending_in}"