diff options
author | Prabhu Ramachandran | 2016-07-12 08:50:57 -0500 |
---|---|---|
committer | GitHub | 2016-07-12 08:50:57 -0500 |
commit | 73552024136f906f2af0c5f2737216f2db1310e9 (patch) | |
tree | bcf980d4422dec9bd896638999b77b5a4149839f /yaksh/models.py | |
parent | f1f9818a397a954acf3bce134ea278fafca81a08 (diff) | |
parent | 2725f202757694d966d00c413b327bb163fba67f (diff) | |
download | online_test-73552024136f906f2af0c5f2737216f2db1310e9.tar.gz online_test-73552024136f906f2af0c5f2737216f2db1310e9.tar.bz2 online_test-73552024136f906f2af0c5f2737216f2db1310e9.zip |
Merge pull request #115 from maheshgudi/master
minor changes in timezone and change password templates
Diffstat (limited to 'yaksh/models.py')
-rw-r--r-- | yaksh/models.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/yaksh/models.py b/yaksh/models.py index c48eef1..4ee6141 100644 --- a/yaksh/models.py +++ b/yaksh/models.py @@ -163,7 +163,9 @@ class Profile(models.Model): department = models.CharField(max_length=64) position = models.CharField(max_length=64) timezone = models.CharField(max_length=64, - choices=[(tz, tz) for tz in pytz.common_timezones]) + default=pytz.utc.zone, + choices=[(tz, tz) for tz in pytz.common_timezones] + ) ############################################################################### @@ -334,13 +336,16 @@ class QuizManager(models.Manager): trial_quiz.pk = None trial_quiz.description = trial_quiz_name trial_quiz.is_trial = True - trial_quiz.time_between_attempts = 0 trial_quiz.prerequisite = None if godmode: + trial_quiz.time_between_attempts = 0 trial_quiz.duration = 1000 + trial_quiz.attempts_allowed = -1 trial_quiz.active = True trial_quiz.start_date_time = timezone.now() - trial_quiz.end_date_time = datetime(2199, 1, 1, 0, 0, 0, 0) + trial_quiz.end_date_time = datetime(2199, 1, 1, 0, 0, 0, 0, + tzinfo=pytz.utc + ) trial_quiz.save() return trial_quiz |