fix typho in creation link
This commit is contained in:
parent
ce5f88b134
commit
f6b723b76a
1 changed files with 5 additions and 4 deletions
|
@ -600,7 +600,7 @@ class UserCreateAPI(APIView):
|
||||||
base_url = "{0}://{1}".format(self.request.scheme,
|
base_url = "{0}://{1}".format(self.request.scheme,
|
||||||
self.request.get_host())
|
self.request.get_host())
|
||||||
creationtime = int(datetime.utcnow().timestamp())
|
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
|
# Construct the data for the email
|
||||||
email_from = settings.EMAIL_FROM_ADDRESS
|
email_from = settings.EMAIL_FROM_ADDRESS
|
||||||
|
@ -624,9 +624,10 @@ class UserCreateAPI(APIView):
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
mail.send()
|
mail.send()
|
||||||
except:
|
except Exception as e:
|
||||||
return Response('Failed to send the email', 201)
|
return response('Failed to send the email, please try again', 400)
|
||||||
return Response('Email with activation link successfully sent', 200)
|
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):
|
class SeedRetrieveCreate(APIView):
|
||||||
|
|
Loading…
Reference in a new issue