diff options
author | ankitjavalkar | 2015-07-09 16:19:24 +0530 |
---|---|---|
committer | ankitjavalkar | 2015-09-07 17:58:59 +0530 |
commit | 81e119899ebc04b53ac9c15c66286c8dbc08726b (patch) | |
tree | 1eb648f180cfda74842b5a5addc378e9bf97d738 /testapp/yaksh_app/models.py | |
parent | 31f5e743031d105b0406e9587dc33bb065cd6e4d (diff) | |
download | online_test-81e119899ebc04b53ac9c15c66286c8dbc08726b.tar.gz online_test-81e119899ebc04b53ac9c15c66286c8dbc08726b.tar.bz2 online_test-81e119899ebc04b53ac9c15c66286c8dbc08726b.zip |
Add Date-Time limits for exams
Diffstat (limited to 'testapp/yaksh_app/models.py')
-rw-r--r-- | testapp/yaksh_app/models.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/testapp/yaksh_app/models.py b/testapp/yaksh_app/models.py index 9e37ef5..62ac9bc 100644 --- a/testapp/yaksh_app/models.py +++ b/testapp/yaksh_app/models.py @@ -160,7 +160,14 @@ class Quiz(models.Model): """ # The start date of the quiz. - start_date = models.DateField("Date of the quiz") + start_date_time = models.DateTimeField("Start Date and Time of the quiz", + default=datetime.datetime.now(), + null=True) + + # The end date and time of the quiz + end_date_time = models.DateTimeField("End Date and Time of the quiz", + default=datetime.datetime(2199, 1, 1, 0, 0, 0, 0), + null=True) # This is always in minutes. duration = models.IntegerField("Duration of quiz in minutes", default=20) @@ -192,7 +199,7 @@ class Quiz(models.Model): def __unicode__(self): desc = self.description or 'Quiz' - return '%s: on %s for %d minutes' % (desc, self.start_date, + return '%s: on %s for %d minutes' % (desc, self.start_date_time, self.duration) |