I am writing a simple game in Django, all of things were right, but suddenly..., I was encountered by following error:
It asked me for entering a default value for DateTimeField()
It is doing this because you have not specified a default, and the field is not optional. Since its a destructive change, you have to provide a default value.
You probably just hit enter and hence the exception, since a blank string is not a valid entry for DateTimeField
.
The solution is to run migrate again, and this time provide a valid date and time string; which will be used for all existing rows in your database; example of a valid format is 2015-02-12 00:00