diff options
author | adityacp | 2017-06-12 18:24:01 +0530 |
---|---|---|
committer | adityacp | 2017-06-12 18:24:01 +0530 |
commit | 3552f4bc8082fc3ecc5290029cac6a839cd3b247 (patch) | |
tree | bb2014bed4c67f644932070611bcdb68eb234912 /yaksh/send_emails.py | |
parent | a002ab59dbff856ee3838078cbe4f8fa439fd894 (diff) | |
parent | eae6ee7ceb25f78b216a5e2c9d6165513272e4cb (diff) | |
download | online_test-3552f4bc8082fc3ecc5290029cac6a839cd3b247.tar.gz online_test-3552f4bc8082fc3ecc5290029cac6a839cd3b247.tar.bz2 online_test-3552f4bc8082fc3ecc5290029cac6a839cd3b247.zip |
Add latest changes after rebase
Diffstat (limited to 'yaksh/send_emails.py')
-rw-r--r-- | yaksh/send_emails.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/yaksh/send_emails.py b/yaksh/send_emails.py index 20d6f02..4465ce9 100644 --- a/yaksh/send_emails.py +++ b/yaksh/send_emails.py @@ -5,7 +5,6 @@ except ImportError: from string import ascii_letters as letters from string import digits, punctuation import hashlib -from random import randint from textwrap import dedent import smtplib import os @@ -21,7 +20,7 @@ from django.core.files.base import ContentFile def generate_activation_key(username): """ Generate hashed secret key for email activation """ chars = letters + digits + punctuation - secret_key = get_random_string(randint(10, 40), chars) + secret_key = get_random_string(20, chars) return hashlib.sha256((secret_key + username).encode('utf-8')).hexdigest() |