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?
I will do it in six steps (migrations):
This is easy, but a little tedious
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.