From 9ebedf2865963d2c2306b5c31b829f409a9bc2da Mon Sep 17 00:00:00 2001 From: prathamesh Date: Mon, 13 Mar 2017 13:36:59 +0530 Subject: 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 --- yaksh/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yaksh/models.py') 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 ) -- cgit