From f6b723b76a3b6133f6731a68a468ecb76b24b878 Mon Sep 17 00:00:00 2001 From: William Colmenares Date: Thu, 30 May 2019 05:04:11 -0400 Subject: [PATCH] fix typho in creation link --- dal/views.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dal/views.py b/dal/views.py index 0717334..d1e563a 100644 --- a/dal/views.py +++ b/dal/views.py @@ -600,7 +600,7 @@ class UserCreateAPI(APIView): base_url = "{0}://{1}".format(self.request.scheme, self.request.get_host()) creationtime = int(datetime.utcnow().timestamp()) - link = activate_account_link(base_url, username, pwd, firstname, lastname, email. creationtime) + link = activate_account_link(base_url, username, pwd, firstname, lastname, email, creationtime) # Construct the data for the email email_from = settings.EMAIL_FROM_ADDRESS @@ -624,9 +624,10 @@ class UserCreateAPI(APIView): ) try: mail.send() - except: - return Response('Failed to send the email', 201) - return Response('Email with activation link successfully sent', 200) + except Exception as e: + return response('Failed to send the email, please try again', 400) + return Response('An email with activation link has been sent in order to complete your registration.\n\ + \nPlease check your inbox.', 200) class SeedRetrieveCreate(APIView):