"Fixed default value provided" after upgrading to Django 1.8

The function datetime.now() is currently executed as soon as your code is imported, i.e. when you (re)start your server. All subsequent model instances will have the same value.

Instead, you should pass a callable function to default, that is executed each time a model instance needs a default value. The hint wants to convey that you should literally use DateField(default=django.utils.timezone.now) without the parentheses.

The message is slightly misleading, but Django doesn't know whether you used datetime.now() or django.utils.timezone.now().


The difference between timezone.now() and datetime.now() has been explained well in the above answers. However, the reason you're getting an error is because you are running the function which will set the default time as the time while applying migrations to the database.

All you had to do was use,

my_date = DateField(default=datetime.now)

instead of

my_date = DateField(default=datetime.now())

In the above method, the timezone.now function will be called while inserting/ modifying an Object.