2
You should be passing the UserProfile object as the instance, not the user.
new_api_form = ChangeApiForm(request.POST, instance=request.user.userprofile)
Source:stackexchange.com
2
You should be passing the UserProfile object as the instance, not the user.
new_api_form = ChangeApiForm(request.POST, instance=request.user.userprofile)