@api_view(['POST'])
@authentication_classes([WebpageTokenAuth])
@permission_classes([IsAuthenticated])
def user_update(request):
    '\n    Update the user profile associated with the requesting user.\n    '
    changeable_user_fields = {'Username', 'PersonalBio', 'URL', 'CompanyAffiliation'}
    changeable_contact_fields = {'FirstName', 'LastName', 'URL', 'WorkPhone', 'PreferredContactMethod', 'Title'}
    user_data = filter_dict_keys(request.data, changeable_user_fields)
    contact_data = filter_dict_keys(request.data, changeable_contact_fields)
    for field in ENUM_FIELDS.intersection(contact_data.keys()):
        contact_data[field] = get_enum_value_row(field, contact_data[field])
    user = request.user
    User.objects.filter(UserID=user.UserID).update(**user_data)
    Contact.objects.filter(ContactID=user.ContactID.ContactID).update(**contact_data)
    return Response('Success', status=status.HTTP_200_OK)
Update the user profile associated with the requesting user.
@api_view(['POST'])
@authentication_classes([WebpageTokenAuth])
@permission_classes([IsAuthenticated])
def user_update(request):
    '\n    \n    '
    changeable_user_fields = {'Username', 'PersonalBio', 'URL', 'CompanyAffiliation'}
    changeable_contact_fields = {'FirstName', 'LastName', 'URL', 'WorkPhone', 'PreferredContactMethod', 'Title'}
    user_data = filter_dict_keys(request.data, changeable_user_fields)
    contact_data = filter_dict_keys(request.data, changeable_contact_fields)
    for field in ENUM_FIELDS.intersection(contact_data.keys()):
        contact_data[field] = get_enum_value_row(field, contact_data[field])
    user = request.user
    User.objects.filter(UserID=user.UserID).update(**user_data)
    Contact.objects.filter(ContactID=user.ContactID.ContactID).update(**contact_data)
    return Response('Success', status=status.HTTP_200_OK)