Changing Image In Django User Change Form
I am making a django webapp where users can upload profile image. I have also created an EDIT PROFILE page by using the default USERCHANGEFORM. But the problem is, that I cannot up
Solution 1:
Basically you are getting the instance but you are not only able to update only the picture.
Solution 2:
Try this!
In your EditProfileForm
replace
super(UserChangeForm, self).__init__(*args, **kwargs)
to
super(EditProfileForm, self).__init__(*args, **kwargs)
same in your SignUpForm replace
super(UserCreationForm, self).__init__(*args, **kwargs)
to
super(SignUpForm, self).__init__(*args, **kwargs)
And you forgot to add photo inside EditProfileForm for field in [...]
Post a Comment for "Changing Image In Django User Change Form"