Getting __init__() got an unexpected keyword argument ‘instance’ with CreateView of Django

I suspect class UserForm should be model form. You may want to change fields, but it should be derived from `ModelForm.

So change form definition to

class UserForm(forms.ModelForm):
   class Meta:
       model = User
       fields = [...] # list of fields you want from model

   #or define fields that you want.
   ....

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)