Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python TypeError:uuu init_uuu()缺少1个必需的位置参数:';至';_Python_Django - Fatal编程技术网

Python TypeError:uuu init_uuu()缺少1个必需的位置参数:';至';

Python TypeError:uuu init_uuu()缺少1个必需的位置参数:';至';,python,django,Python,Django,当我在终端中运行此代码(python manage.py makemigration crms)时 回溯(最近一次呼叫最后一次): 文件“D:\python\CRM”项目实战\CRM\CRM\crms\models.py”,第26行,客户 consultant=models.ForeignKey(verbose_name=“UserProfile”) TypeError:init()缺少1个必需的位置参数:“to” 您忘记定义FK目标表。您没有指定外键引用的表 consultant = mode

当我在终端中运行此代码(python manage.py makemigration crms)时 回溯(最近一次呼叫最后一次): 文件“D:\python\CRM”项目实战\CRM\CRM\crms\models.py”,第26行,客户 consultant=models.ForeignKey(verbose_name=“UserProfile”) TypeError:init()缺少1个必需的位置参数:“to”


您忘记定义FK目标表。

您没有指定外键引用的表

consultant = models.ForeignKey(verbose_name="UserProfile")

任何人都能回答我的问题吗?非常感谢!
consultant=models.ForeignKey(verbose\u name=“UserProfile”)
:你忘记为什么指定外键了。当然,事实上 my english is poor!but i take it.
consultant = models.ForeignKey(verbose_name="UserProfile")
consultant = models.ForeignKey(Table_name, verbose_name="UserProfile")