Django在尝试将ForeignKey添加到现有Mod时使迁移失败

2024-04-29 06:46:54 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个模型,我正在尝试添加一个foreignkey字段。在

这是字段定义:

part_of_speech = models.ForeignKey('PartOfSpeech', help_text=_('Translation | part_of_speech | help_text'), verbose_name = _('Translation','part_of_speech'))

当我试图执行makemigrations命令时,出现以下错误:

^{pr2}$

Tags: oftextname模型verbose定义modelshelp