【发布时间】:2013-05-10 13:46:33
【问题描述】:
大家好,谁能帮我解决这个问题我在导入时遇到了导入错误,我认为这一切都发生了冲突。在我导入 B 之前一切都很好,因为我真的需要从 A 到 B 的 ForeignKey。
a/models.py
from b.models import B #there is the problem
Class A():
....
b = models.ForeignKey(B) # I really have to do this
b/models.py
from c.models import C
Class B():
....
c = models.ForeignKey(C)
c/models.py
from a.models import A
Class C():
a = models.ForeignKey(A)
【问题讨论】: