Commit dbfec188 authored by Hamza Dely's avatar Hamza Dely
Browse files

[comptes/models] Implémentation de Adherent.get_absolute_url()

parent 0a80e2c0
......@@ -12,6 +12,7 @@ from django.core.mail import send_mail
from django.core.validators import RegexValidator
from django.core.exceptions import ValidationError, PermissionDenied
from django.template import loader
from django.urls import reverse
from note_kfet import droits as m_droits
from note_kfet.utils import CumulativeDict
......@@ -730,6 +731,12 @@ class Adherent(AbstractBaseUser):
message = template.render(context=context, request=request)
self.email_user(subject, message, from_email, **kwargs)
def get_absolute_url(self):
"""
Renvoie l'URL associée au profil d'un adhérent
"""
return reverse('comptes:detail', kwargs={'pk': self.id})
# Propriétés
@property
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment