'Get and enroll a user in the given course. Mode is optional and defers to the enrollment API for defaults.'

def handle(self, *args, **options):

    email = options['email'][0]
    course = options['course'][0]
    user = User.objects.get(email=email)
    try:
        add_enrollment(user.username, course)
    except CourseEnrollmentExistsError:
        pass
