You're not redirecting anywhere (self.route does a redirect). Also, you can't redirect here because you're doing an ajax call. I'm pretty sure the assignment for phones and emails isn't correct because you're casting arrays to strings. We'll talk about it in the office tomorrow. Also as sza pointed out, you don't pass self for method calls.
@view_config(route_name="profile", request_method='POST')
def save_profile(self):
try:
json = self.request.json_body
#username = str(json['userName'])
first_name = str(json['firstName'])
last_name = str(json['lastName'])
phones = str(json['phones'])
emails = str(json['emails'])
self.profiles.update(firstName=first_name, lastName=last_name, emails=emails, phones=phones)
value = {'result:': 'success', 'message': 'Profile Saved!'}
except Exception, err:
print err
value = {'result:': 'error', 'message': 'There was an error processing the request'}
#returns a json response
return self.respond(value)