How can I replace a CharField to ForeignKey using south in django?
问题 My task model: class Tasks(models.Model): state = models.CharField(max_length = 150) I want to change the state field to ForeignKey like state = models.ForeignKey(States) Where States model would be: class States(model.Model): name = models.CharField(max_length = 150) BTW I am using Django non-rel with django mongodb. Is it easy to do using south?or is thr any other way to do it? 回答1: I will do it in six steps (migrations): First step a data_migration (south command): I create the States