Does changing a django models related_name attribute require a south migration?

后端 未结 2 1129
情歌与酒
情歌与酒 2021-02-13 07:04

I have a simple django model with a ForeignKey

class FooModel(models.Model):
    foo = models.ForeignKey(\'Foo\', related_name=\"foo_choices\")
    bar = models.         


        
2条回答
  •  太阳男子
    2021-02-13 07:31

    The above accepted answer is now outdated.

    Django does create and alter field foreign_key_field on model migration when the related name of a foreign key field changes.

提交回复
热议问题