On passe connection_method en propriété

This commit is contained in:
Tom Hubrecht 2021-03-21 10:01:50 +01:00
parent 16223e49f2
commit 6222a9d999

View file

@ -150,6 +150,7 @@ class User(AbstractUser):
def get_prefix(self):
return self.username.split("__")[0]
@property
def connection_method(self):
method = self.username.split("__")[0]
return CONNECTION_METHODS.get(method, _("identifiants spécifiques"))