Пример #1
0
def step(context, uid):
    if ((Student.objects.filter(uid=uid).exists()) is False):
        if (User.objects.filter(username=uid).exists()):
            User.objects.get(username=uid).delete()
        user = User()
        user.username = uid
        user.set_password("seal")
        user.email = "*****@*****.**"
        user.save()
        student = Student()
        student.user = user
        student.uid = uid
        student.save()
Пример #2
0
def step(context, uid):
    if((Student.objects.filter(uid=uid).exists()) is False):
        if(User.objects.filter(username=uid).exists()):
            User.objects.get(username=uid).delete()
        user = User()
        user.username = uid
        user.set_password("seal")
        user.email = "*****@*****.**"
        user.save()
        student = Student()
        student.user = user
        student.uid = uid
        student.save()
Пример #3
0
def step(context, username, email):
    if (Student.objects.filter(uid=username).exists()):
        student = Student.objects.get(uid=username)
        student.user.set_password(username)
        student.user.save()
        student.save()
    else:
        student = Student()
        student.uid = username
        user = User()
        user.username = username
        user.first_name = username
        user.last_name = username
        user.set_password(username)
        user.email = email
        user.save()
        student.user = user
        student.save()
Пример #4
0
def step(context, username, email):
    if(Student.objects.filter(uid=username).exists()):
        student = Student.objects.get(uid=username)
        student.user.set_password(username)
        student.user.save()
        student.save()
    else:
        student = Student()
        student.uid = username
        user = User()
        user.username = username
        user.first_name = username
        user.last_name = username
        user.set_password(username)
        user.email = email
        user.save()
        student.user = user
        student.save()