Hi,

On my website i have a edit profile page, this enables users to edit 4
fields : username, first name, last name and email address. For some
reason the form never validates, is it not enough just to pass the 4
fields i want to edit and leave the others as they are ?

My view looks like

def profile_edit(request):
    if request.method == 'POST':
        form = UserChangeForm(request.POST, instance=request.user)
        if form.is_valid():
            edit_user = form.save()
            return HttpResponseRedirect("/accounts/profile/updated")
        else:
            return render_to_response("registration/
profile_edit.html")
            print form.errors
    else:
        user=request.user
        form = UserChangeForm(instance=user)
        return render_to_response("registration/profile_edit.html",
{ 'form':form,})

Is there something else i need to pass to make it validate ?

Thanks for any help
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to