From 429884f4a4daf9a08a7ff051f70371fd9a9a7f30 Mon Sep 17 00:00:00 2001 From: Flavio Tarsetti <flavio.tarsetti@idiap.ch> Date: Sat, 2 May 2020 03:14:05 +0200 Subject: [PATCH] [ui][registration] temporary link integration to new registration --- beat/web/ui/registration/models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/beat/web/ui/registration/models.py b/beat/web/ui/registration/models.py index b6d584f13..ea9274e87 100644 --- a/beat/web/ui/registration/models.py +++ b/beat/web/ui/registration/models.py @@ -43,6 +43,7 @@ from django.utils.translation import ugettext_lazy as _ from ...accounts.models import SupervisionTrack from ...accounts.models import Profile +from ...accounts.models import TemporaryUrl from ...utils import mail SHA1_RE = re.compile("^[a-f0-9]{40}$") @@ -143,10 +144,14 @@ class RegistrationManager(models.Manager): parsed_url.hostname, ) + temp_url = TemporaryUrl() + temp_url._generate_temporary_url(TemporaryUrl.VALIDATION, supervisiontrack) + context = { "supervisor": supervisor_user, "supervisee": user, "prefix": server_address, + "temp_url": temp_url.url_hash, } mail.send_email( -- GitLab