def get_project_members(machine, project_id):
    """
    Returns list of usernames given a project id
    """
    try:
        project = Project.objects.get(pid=project_id)
    except Project.DoesNotExist:
        return 'Project not found'

    return [x.username for x in project.group.members.all()]
Returns list of usernames given a project id