Beispiel #1
0
def signup_teacher_directly():
    title, first_name, last_name, email_address, password = generate_details()
    teacher = Teacher.objects.factory(title, first_name, last_name,
                                      email_address, password)
    generate_token(teacher.user.user, preverified=True)
    teacher.user.save()
    return teacher, email_address, password
def signup_teacher_directly():
    title, first_name, last_name, email_address, password = generate_details()
    teacher = Teacher.objects.factory(
        title, first_name, last_name, email_address, password
    )
    generate_token(teacher.user.user, preverified=True)
    teacher.user.save()
    return teacher, email_address, password
def create_independent_student_directly():
    name, username, email, password = generate_independent_student_details()

    student = Student.objects.independentStudentFactory(username, name, email, password)

    # verify student
    generate_token(student.new_user, preverified=True)

    return username, password, student
def signup_teacher_directly_as_preview_user(**kwargs):
    title, first_name, last_name, email_address, password = generate_details(**kwargs)
    teacher = Teacher.objects.factory(
        title, first_name, last_name, email_address, password
    )
    generate_token(teacher.new_user, preverified=True)
    teacher.user.set_to_preview_user()
    teacher.user.save()
    return email_address, password
def create_independent_student_directly():
    name, username, email, password = generate_independent_student_details()

    student = Student.objects.independentStudentFactory(username, name, email, password)

    # verify student
    generate_token(student.new_user, preverified=True)

    return username, password, student