def user_profile(request):
    success = False
user = User.objects.get(pk=request.user.id)
if request.method == 'POST':
    upform = UserProfileForm(request.POST, instance=user.get_profile())
if upform.is_valid():
    up = upform.save(commit=False)
Django, updating a user profile with a ModelForm