summaryrefslogtreecommitdiff
path: root/yaksh/models.py
diff options
context:
space:
mode:
authorankitjavalkar2015-11-05 15:31:56 +0530
committerankitjavalkar2016-01-15 17:12:09 +0530
commite6cc3a71a0c41c40e95b47d7f001a7d948dba9fc (patch)
tree19b85d1e0c01f52e3458610980f10f89e7ba0866 /yaksh/models.py
parent3f037c26bc5c09ddfbd24930148233535770b38b (diff)
downloadonline_test-e6cc3a71a0c41c40e95b47d7f001a7d948dba9fc.tar.gz
online_test-e6cc3a71a0c41c40e95b47d7f001a7d948dba9fc.tar.bz2
online_test-e6cc3a71a0c41c40e95b47d7f001a7d948dba9fc.zip
Allow single user session active at any given time
Diffstat (limited to 'yaksh/models.py')
-rw-r--r--yaksh/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 62ac9bc..15340f3 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -8,6 +8,12 @@ from taggit.managers import TaggableManager
###############################################################################
+class Visitor(models.Model):
+ visitor_user = models.OneToOneField(User, null=False)
+ session_key = models.CharField(null=False, max_length=40)
+
+
+###############################################################################
class Profile(models.Model):
"""Profile for a user to store roll number and other details."""
user = models.OneToOneField(User)