原文连接:Django 模型一对一、一对多、多对多的操作详解
INSERT INTO `app1_class` VALUES ('1', '1609B', '2018-12-05');
INSERT INTO `app1_class` VALUES ('2', '1609A', '2018-12-11');
INSERT INTO `app1_class` VALUES ('3', '1609C', '2018-12-11');
INSERT INTO `app1_class` VALUES ('4', '1609D', '2018-12-11');
INSERT INTO `app1_class` VALUES ('5', '1609E', '2018-12-11');
INSERT INTO `app1_teacher` VALUES ('1', 'zhoulaoshi');
INSERT INTO `app1_teacher` VALUES ('2', 'wanglaoshi');
INSERT INTO `app1_teacher` VALUES ('3', 'tianlaoshi');
INSERT INTO `app1_teacher` VALUES ('4', 'wulaoshi');
INSERT INTO `app1_teacher` VALUES ('5', 'lilaoshi');
INSERT INTO `app1_teacher_cid` VALUES ('1', '1', '2');
INSERT INTO `app1_teacher_cid` VALUES ('2', '1', '3');
INSERT INTO `app1_teacher_cid` VALUES ('3', '2', '1');
INSERT INTO `app1_teacher_cid` VALUES ('4', '2', '3');
INSERT INTO `app1_teacher_cid` VALUES ('5', '3', '4');
INSERT INTO `app1_teacher_cid` VALUES ('6', '4', '1');
INSERT INTO `app1_teacher_cid` VALUES ('7', '4', '5');
INSERT INTO `app1_teacher_cid` VALUES ('8', '5', '3');
INSERT INTO `app1_teacher_cid` VALUES ('9', '5', '4');
INSERT INTO `app1_studentdetail` VALUES ('1', '178', '1@qq.com', '11111');
INSERT INTO `app1_studentdetail` VALUES ('2', '172', '2@qq.com', '222');
INSERT INTO `app1_studentdetail` VALUES ('3', '168', '3@qq.com', '333');
INSERT INTO `app1_studentdetail` VALUES ('4', '158', '4@qq.com', '444');
INSERT INTO `app1_studentdetail` VALUES ('5', '155', '5@qq.com', '555');
INSERT INTO `app1_studentdetail` VALUES ('6', '190', '6@qq.com', '666');
INSERT INTO `app1_studentdetail` VALUES ('7', '111', '7@qq.com', '777');
INSERT INTO `app1_studentdetail` VALUES ('8', '158', '8@qq.com', '888');
INSERT INTO `app1_student` VALUES ('1', 'gaofeifie', '1', '1');
INSERT INTO `app1_student` VALUES ('2', 'zgz', '2', '2');
INSERT INTO `app1_student` VALUES ('3', 'dh', '3', '3');
INSERT INTO `app1_student` VALUES ('4', 'gaohan', '3', '4');
INSERT INTO `app1_student` VALUES ('5', 'jzl', '4', '5');
INSERT INTO `app1_student` VALUES ('6', 'dl', '1', '6');
INSERT INTO `app1_student` VALUES ('7', 'zyf', '1', '7');