Skip to content

Commit b3876ac

Browse files
committed
added fixtures: Initial datas -> some questions, a teacher(user: sumee, pass: sumee1910) and a student(user: suhail, pass: sumee1910) accounts
1 parent c1aaa06 commit b3876ac

File tree

3 files changed

+216
-3
lines changed

3 files changed

+216
-3
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ Create the database:
2929
python manage.py migrate
3030
```
3131

32+
Load datas, some questions, a **teacher**(user: `sumee`,pass: `sumee1910`) and a **student**(user: `suhail`,pass: `sumee1910`)
33+
```bash
34+
python manage.py loaddata datas.json
35+
```
36+
3237
Finally, run the development server:
3338

3439
```bash
Lines changed: 209 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,209 @@
1+
[{
2+
"model": "classroom.question",
3+
"pk": 1,
4+
"fields": {
5+
"quiz": 1,
6+
"text": "When was the Treaty of Versailles signed?"
7+
}
8+
}, {
9+
"model": "classroom.question",
10+
"pk": 2,
11+
"fields": {
12+
"quiz": 1,
13+
"text": "Britain, France, USA, Germany, Italy, and Russia."
14+
}
15+
}, {
16+
"model": "classroom.question",
17+
"pk": 3,
18+
"fields": {
19+
"quiz": 1,
20+
"text": "The war ended on November 11 1918."
21+
}
22+
}, {
23+
"model": "classroom.question",
24+
"pk": 4,
25+
"fields": {
26+
"quiz": 1,
27+
"text": "The name of the new government in Germany was called the Wiemar Republic."
28+
}
29+
}, {
30+
"model": "classroom.answer",
31+
"pk": 1,
32+
"fields": {
33+
"question": 1,
34+
"text": "June 29 of 1919",
35+
"is_correct": true
36+
}
37+
}, {
38+
"model": "classroom.answer",
39+
"pk": 2,
40+
"fields": {
41+
"question": 1,
42+
"text": "June 29 of 1920",
43+
"is_correct": false
44+
}
45+
}, {
46+
"model": "classroom.answer",
47+
"pk": 3,
48+
"fields": {
49+
"question": 1,
50+
"text": "March 29 of 1919",
51+
"is_correct": false
52+
}
53+
}, {
54+
"model": "classroom.answer",
55+
"pk": 4,
56+
"fields": {
57+
"question": 1,
58+
"text": "August 29 of 1920",
59+
"is_correct": false
60+
}
61+
}, {
62+
"model": "classroom.answer",
63+
"pk": 5,
64+
"fields": {
65+
"question": 2,
66+
"text": "How much money did Germany have to pay as a reparation?",
67+
"is_correct": false
68+
}
69+
}, {
70+
"model": "classroom.answer",
71+
"pk": 6,
72+
"fields": {
73+
"question": 2,
74+
"text": "Which countries were involved in World War 1?",
75+
"is_correct": true
76+
}
77+
}, {
78+
"model": "classroom.answer",
79+
"pk": 7,
80+
"fields": {
81+
"question": 2,
82+
"text": "What does BRAT stand for in the Treaty of Versailles?",
83+
"is_correct": false
84+
}
85+
}, {
86+
"model": "classroom.answer",
87+
"pk": 8,
88+
"fields": {
89+
"question": 2,
90+
"text": "What does MAIN stand for when it comes to the causes of the first world war?",
91+
"is_correct": false
92+
}
93+
}, {
94+
"model": "classroom.answer",
95+
"pk": 9,
96+
"fields": {
97+
"question": 3,
98+
"text": "When was the Treaty of Versailles signed?",
99+
"is_correct": true
100+
}
101+
}, {
102+
"model": "classroom.answer",
103+
"pk": 10,
104+
"fields": {
105+
"question": 3,
106+
"text": "Why did Germany declare war on Russia?",
107+
"is_correct": false
108+
}
109+
}, {
110+
"model": "classroom.answer",
111+
"pk": 11,
112+
"fields": {
113+
"question": 3,
114+
"text": "When did World War 1 begin?",
115+
"is_correct": false
116+
}
117+
}, {
118+
"model": "classroom.answer",
119+
"pk": 12,
120+
"fields": {
121+
"question": 3,
122+
"text": "When did World War 1 end?",
123+
"is_correct": false
124+
}
125+
}, {
126+
"model": "classroom.answer",
127+
"pk": 13,
128+
"fields": {
129+
"question": 4,
130+
"text": "What does MAIN stand for when it comes to the causes of the first world war?",
131+
"is_correct": false
132+
}
133+
}, {
134+
"model": "classroom.answer",
135+
"pk": 14,
136+
"fields": {
137+
"question": 4,
138+
"text": "What was the name of the new government in Germany after World War 1?",
139+
"is_correct": true
140+
}
141+
}, {
142+
"model": "classroom.answer",
143+
"pk": 15,
144+
"fields": {
145+
"question": 4,
146+
"text": "Were the Big Three happy about the outcome of the Treaty of Versailles?",
147+
"is_correct": false
148+
}
149+
}, {
150+
"model": "classroom.answer",
151+
"pk": 16,
152+
"fields": {
153+
"question": 4,
154+
"text": "How much money did Germany have to pay as a reparation?",
155+
"is_correct": false
156+
}
157+
},{
158+
"model": "classroom.user",
159+
"pk": 1,
160+
"fields": {
161+
"password": "pbkdf2_sha256$100000$fBZ6FNGxOrNT$O53zRTxQFRUSqX+THFIxWZn0evHJE0l32ST2BA0aKy4=",
162+
"last_login": "2018-06-21T05:34:02.608Z",
163+
"is_superuser": false,
164+
"username": "suhail",
165+
"first_name": "",
166+
"last_name": "",
167+
"email": "",
168+
"is_staff": false,
169+
"is_active": true,
170+
"date_joined": "2018-06-21T04:47:59.795Z",
171+
"is_student": true,
172+
"is_teacher": false,
173+
"groups": [],
174+
"user_permissions": []
175+
}
176+
}, {
177+
"model": "classroom.user",
178+
"pk": 2,
179+
"fields": {
180+
"password": "pbkdf2_sha256$100000$qSn4XCPpb6Ry$XjIgpmcuUzajsPso6UWzDUSNDMbC6bwTQYUuUghk8PY=",
181+
"last_login": "2018-06-21T05:35:05.133Z",
182+
"is_superuser": false,
183+
"username": "sumee",
184+
"first_name": "",
185+
"last_name": "",
186+
"email": "",
187+
"is_staff": false,
188+
"is_active": true,
189+
"date_joined": "2018-06-21T04:48:26.868Z",
190+
"is_student": false,
191+
"is_teacher": true,
192+
"groups": [],
193+
"user_permissions": []
194+
}
195+
}, {
196+
"model": "classroom.quiz",
197+
"pk": 1,
198+
"fields": {
199+
"owner": 2,
200+
"name": "World War 1",
201+
"subject": 5
202+
}
203+
}, {
204+
"model": "classroom.student",
205+
"pk": 1,
206+
"fields": {
207+
"interests": [2, 3, 5]
208+
}
209+
}]

requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
Django==2.0.1
2-
django-crispy-forms==1.7.0
3-
pytz==2017.3
1+
Django==2.0.6
2+
django-crispy-forms==1.7.2

0 commit comments

Comments
 (0)