在views.py中设置注册功能(尝试运行服务器时出现错误消息)

问题描述 投票:0回答:1

当我尝试运行服务器时出现此错误消息:

django.core.exceptions.ImproperlyConfigured:禁止创建没有'fields'属性或'exclude'属性的ModelForm;表单UserProfileInfoForm需要更新。

有人可以告诉我这是什么意思,以便我可以更正我的代码吗?这是屏幕截图:

Screenshot of views.py

django django-models django-forms django-views
1个回答
0
投票
在modelForm中,创建Meta类,并添加字段或excloude变量,之后您应该会很好。
© www.soinside.com 2019 - 2024. All rights reserved.