1π
β
The error is caused by phone
field:
class Meta:
model = User
fields = ('username', 'email', 'phone', 'password1', 'password2',)
^^^^^^
In your case, fields
in class Meta
is used to specify which fields of your User
model will be in your form. You can omit some fields of your model with it.
Your User
model does not have a field named phone
. Adding this field to your model will solve your problem and do not forget executing python manage.py makemigrations
.
If your model has this field, then you might forget applying migrations with python manage.py makemigrations
.
π€black
Source:stackexchange.com