@login_required
def display_person_edit_name_do(request):
 user = request.user
 new_first = request.POST['first_name']
 new_last = request.POST['last_name']
 user.first_name = new_first
 user.last_name = new_last
 user.save()
 return HttpResponseRedirect(('/people/%s' % urllib.quote(user.username)))

@ login_required def display_person_edit_name_do ( request ) : user = request . user new_first = request . POST [ 'first_name' ] new_last = request . POST [ 'last_name' ] user . first_name = new_first user . last_name = new_last user . save ( ) return HttpResponseRedirect ( ( '/people/%s' % urllib . quote ( user . username ) ) )
take the new first name and last name out of the post .