summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authoradityacp2017-04-07 15:52:53 +0530
committeradityacp2017-04-07 16:12:36 +0530
commit5938bbf5d6510dcb51096a7e943a2e2208d06b7b (patch)
tree9e0a49ef3fcdabed60ba9cffd9c27678ddfdb50e /yaksh/models.py
parentad73f7b938b7620ab4be202dc33c699cf5cb4ac5 (diff)
downloadonline_test-5938bbf5d6510dcb51096a7e943a2e2208d06b7b.tar.gz
online_test-5938bbf5d6510dcb51096a7e943a2e2208d06b7b.tar.bz2
online_test-5938bbf5d6510dcb51096a7e943a2e2208d06b7b.zip
Change in forms, models, urls, views
- Add is_email_expired, activation_key, key_expiry_time in Profile model - Add new functions activate_user and new_activation in views for verifying and activating user via email - Change user_login and user_register functions in views for email verification - Change in forms.py to verify email during registration - Add activation urls in urls.py
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 802a1fc..3e80570 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -251,6 +251,9 @@ class Profile(models.Model):
default=pytz.utc.zone,
choices=[(tz, tz) for tz in pytz.common_timezones]
)
+ is_email_verified = models.BooleanField(default=False)
+ activation_key = models.CharField(max_length=40, blank=True, null=True)
+ key_expiry_time = models.DateTimeField(blank=True, null=True)
def get_user_dir(self):
"""Return the output directory for the user."""