python - django convert datetimefield to datefield with mysql backend -
for django app, want convert datetimefield datefield. resulting in error :
date truncation column ... can please tell me how ?
i have tried this:
i have written datamigration before schemamigration modifies values of datetimefield datetime date .
obj.datetimefield = obj.datetimefield.date() obj.save() --- error here.
how expect work without schemamigration?
you add field model, then run code copy old field new field after modification(s). then can delete old field , finally rename new field.
but honestly, should have @ south, excellent , common used tool migrating django models.
Comments
Post a Comment