我遇到了自动相关名称冲突的问题,并且通常不需要在相关模型上安装外部管理器.
例如,如果我可以:
class ExtraWidgetThingy(models.Model):
product = models.ForeignKey("product.Product")
also_tastes_good_with = models.ForeignKey(
"product.Product", related_name=None)
Run Code Online (Sandbox Code Playgroud)
代替 related_name='extrawidgetthingys_that_also_tastes_good_with_this'