summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
authorprathamesh2017-03-13 13:36:59 +0530
committerprathamesh2017-03-13 13:36:59 +0530
commit9ebedf2865963d2c2306b5c31b829f409a9bc2da (patch)
treebc975c07e1fbc9b6e394e94f542ad0b4d8f66bcb /yaksh
parent4ce30381757815f851fce701ee61d86001a6624b (diff)
downloadonline_test-9ebedf2865963d2c2306b5c31b829f409a9bc2da.tar.gz
online_test-9ebedf2865963d2c2306b5c31b829f409a9bc2da.tar.bz2
online_test-9ebedf2865963d2c2306b5c31b829f409a9bc2da.zip
Removed a function call to datetime now in default quiz start time.
Every time when we run makemigrations, model changes are detected. "Alter field start_date_time on quiz" was always detected, even if you have not mode any changes to the models! This was happening because of default time value was datetime.now(). So every time when you ran migrations current datetime was set which will always change. Now removed parenthesis(), so that now function is not called. And no unnecessary model changes will be detected
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/yaksh/models.py b/yaksh/models.py
index 398f508..8709710 100644
--- a/yaksh/models.py
+++ b/yaksh/models.py
@@ -532,7 +532,7 @@ class Quiz(models.Model):
# The start date of the quiz.
start_date_time = models.DateTimeField(
"Start Date and Time of the quiz",
- default=timezone.now(),
+ default=timezone.now,
null=True
)