From 5f87e76be82f6ecf03ecb2e45ad75d52e1a0a4a9 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Sun, 9 Aug 2020 13:42:37 +0200 Subject: [PATCH] Fix Profile model in Django Admin --- apps/member/models.py | 5 ++++- locale/fr/LC_MESSAGES/django.po | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/member/models.py b/apps/member/models.py index 29174732..13002158 100644 --- a/apps/member/models.py +++ b/apps/member/models.py @@ -142,7 +142,10 @@ class Profile(models.Model): indexes = [models.Index(fields=['user'])] def get_absolute_url(self): - return reverse('user_detail', args=(self.pk,)) + return reverse('member:user_detail', args=(self.user_id,)) + + def __str__(self): + return str(self.user) def send_email_validation_link(self): subject = "[Note Kfet]" + str(_("Activate your Note Kfet account")) diff --git a/locale/fr/LC_MESSAGES/django.po b/locale/fr/LC_MESSAGES/django.po index 6a6855ac..d3b5fd5a 100644 --- a/locale/fr/LC_MESSAGES/django.po +++ b/locale/fr/LC_MESSAGES/django.po @@ -504,7 +504,7 @@ msgstr "adresse email confirmée" #: apps/member/models.py:111 msgid "registration valid" -msgstr "inscription valid" +msgstr "inscription valide" #: apps/member/models.py:140 apps/member/models.py:141 msgid "user profile"