[Answer]-Migrate error with Django 1.7 while adding new model

1👍

When Django asks “add default values to create table”, you need to create values that resonate with the TYPE of that particular column.

Your error is apparent here:
django.core.exceptions.ValidationError: [u”’00:00:00′ value has an invalid format. It must be in YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ] format.”]

The “random” values you entered must be in YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ] format.

Remove the DateTimeFields from the model, remigrate, and start over. This time, when you’re asked to put in default values, put it a random ‘datetime’ (i.e. 2006-10-25 14:30:59).

Source: https://docs.djangoproject.com/en/1.7/ref/forms/fields/#datetimefield

Best,
aj

👤A.J.

Leave a comment