1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-04 12:52:15 +02:00

All indexed fields are autocompleted

This commit is contained in:
Yohann D'ANELLO
2020-10-15 14:55:45 +02:00
parent 11ebc6848b
commit 980b2c9d8e
5 changed files with 13 additions and 11 deletions

View File

@ -2,6 +2,7 @@ from corres2math.tokens import email_validation_token
from django.contrib.sites.models import Site
from django.db import models
from django.template import loader
from django.urls import reverse_lazy
from django.utils.crypto import get_random_string
from django.utils.encoding import force_bytes
from django.utils.http import urlsafe_base64_encode
@ -63,6 +64,9 @@ class Registration(PolymorphicModel):
def is_admin(self):
return isinstance(self, AdminRegistration) or self.user.is_superuser
def get_absolute_url(self):
return reverse_lazy("registration:user_detail", args=(self.user_id,))
def __str__(self):
return f"{self.user.first_name} {self.user.last_name}"