Django south circular dependency

久未见 提交于 2019-12-05 02:57:34

There appears to be a real circular dependency here. You can break it quite easily, though: Move the creation of the m2m table in MyApp to a separate migration. The easiest way to do so, probably, is to copy 0001_initial.py to a new name, then remove the blocks for the m2m table (forwards and backwards!) in the original, and remove everything else in the copy.

The copy should be named so that it is ordered between 0001_initial and 0002_whatever -- say, 0001_initial2.py; and it should depend on ("AnotherApp", "0001_initial") -- which, in turn, should depend on ("MyApp", "0001_initial").

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!