-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnewdata.py
More file actions
105 lines (84 loc) · 2.96 KB
/
newdata.py
File metadata and controls
105 lines (84 loc) · 2.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
from django.contrib.auth.models import User, Group
from account.models import Course, Course_Topics, Instructor_Info, Instructor_Course, Student_Info, Student_Course
from instructor.models import MCQ_Question, Recommendations
from student.models import Student_Answers, Student_Marks
import uuid
import datetime
import random
########################################################################################################################
course = Course.objects.get(courseName = 'CSE110 Principles of Programming')
u = uuid.uuid4()
instructor = Instructor_Info.objects.create(
username = 'navabi',
first_name = 'navabi',
last_name = 'navabi',
email = 'navabi@asu.edu',
password = 'navabipassword',
groups = 'admin',
uuid = str(u.hex),
)
user = User.objects.create_user(
username = 'navabi',
first_name = 'navabi',
last_name = 'navabi',
email = 'navabi@asu.edu',
password = 'navabipassword',
)
user.groups.add(Group.objects.get(name='admin'))
user.save()
Instructor_Course.objects.create(course = course,instructor = instructor)
Instructor_Info.objects.filter(email='navabi@asu.edu').delete()
User.objects.filter(email='navabi@asu.edu').delete()
ajo.thomas@outlook.com
Instructor_Info.objects.filter(email='ajo.thomas@outlook.com').delete()
User.objects.filter(email='ajo.thomas@outlook.com').delete()
Student_Info.objects.filter(email = 'ajo.thomas@outlook.com').delete()
########################################################################################################################
course = Course.objects.get(courseName = 'CSE110 Principles of Programming')
u = uuid.uuid4()
instructor = Instructor_Info.objects.create(
username = 'ihsiao1',
first_name = 'Sharon',
last_name = 'Hsiao',
email = 'ihsiao1@asu.edu',
password = 'sharonpassword',
groups = 'admin',
uuid = str(u.hex),
)
user = User.objects.create_user(
username = 'ihsiao1',
first_name = 'Sharon',
last_name = 'Hsiao',
email = 'ihsiao1@asu.edu',
password = 'sharonpassword',
)
user.groups.add(Group.objects.get(name='admin'))
user.save()
Instructor_Course.objects.create(
course = course,
instructor = instructor,
)
########################################################################################################################
course = Course.objects.get(courseName = 'CSE110 Principles of Programming')
u = uuid.uuid4()
instructor = Instructor_Info.objects.create(
username = 'Mohammed62085',
first_name = 'Mohammed',
last_name = 'Alzaid',
email = 'malzaid1@asu.edu',
password = 'alzaidpassword',
groups = 'admin',
uuid = str(u.hex),
)
instructor = Instructor_Info.objects.get(email = 'malzaid1@asu.edu')
instructor.username = 'Mohammed62085'
instructor.save()
student = Student_Info.objects.get(email = 'malzaid1@asu.edu')
user = User.objects.get(email = 'malzaid1@asu.edu')
user.set_password('alzaidpassword');
user.groups.add(Group.objects.get(name='admin'))
user.save()
Instructor_Course.objects.create(
course = course,
instructor = instructor,
)