From a3cbfb1e3c8109bf0b80ece9c742be9b47ab9304 Mon Sep 17 00:00:00 2001 From: Samuel Gaist <samuel.gaist@idiap.ch> Date: Fri, 20 Dec 2019 09:58:28 +0100 Subject: [PATCH] [accounts][models] Move __unicode__ to __str__ __unicode__ is a leftover of Python 2 --- beat/web/accounts/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beat/web/accounts/models.py b/beat/web/accounts/models.py index 42e4c8c6a..7e272e896 100644 --- a/beat/web/accounts/models.py +++ b/beat/web/accounts/models.py @@ -71,7 +71,7 @@ class SupervisionTrack(models.Model): last_validation_date = models.DateTimeField(null=True, blank=True) supervision_key = models.CharField(max_length=40, null=True, blank=True) - def __unicode__(self): + def __str__(self): return u"Supervisor: %s, Supervisee, %s, Validity: %s" % ( self.supervisor.username, self.supervisee.username, @@ -123,8 +123,8 @@ class Profile(models.Model): objects = ProfileManager() - def __unicode__(self): - return u"User: %s" % self.user.username + def __str__(self): + return "User: %s" % self.user.username def _generate_current_supervision_key(self): length = 40 -- GitLab