From 050c7d5ecbd0c4adcfe9d50d4432df2129810d5f Mon Sep 17 00:00:00 2001 From: Vasilenko Ilia Date: Fri, 26 Feb 2021 13:59:01 +0300 Subject: [PATCH] add postgres --- evgenApp/__pycache__/settings.cpython-37.pyc | Bin 2876 -> 2952 bytes evgenApp/settings.py | 8 +- hyperlinks/__pycache__/models.cpython-37.pyc | Bin 1167 -> 810 bytes hyperlinks/models.py | 14 +--- lessons/__pycache__/gqlTypes.cpython-37.pyc | Bin 6271 -> 6797 bytes lessons/__pycache__/models.cpython-37.pyc | Bin 3917 -> 3774 bytes lessons/__pycache__/schema.cpython-37.pyc | Bin 18104 -> 20339 bytes lessons/gqlTypes.py | 17 +++- lessons/migrations/0009_auto_20210210_2116.py | 23 ++++++ .../0009_auto_20210210_2116.cpython-37.pyc | Bin 0 -> 639 bytes lessons/models.py | 22 ++---- lessons/schema.py | 73 +++++++++++++++++- 12 files changed, 122 insertions(+), 35 deletions(-) create mode 100644 lessons/migrations/0009_auto_20210210_2116.py create mode 100644 lessons/migrations/__pycache__/0009_auto_20210210_2116.cpython-37.pyc diff --git a/evgenApp/__pycache__/settings.cpython-37.pyc b/evgenApp/__pycache__/settings.cpython-37.pyc index 28e9ca81951062747c9cfaf27d696b0e1ca01180..af690d1fc40a472160fde8cb705a8571a289825d 100644 GIT binary patch delta 308 zcmdlZ)*;U8#LLUY00i8p%@VRE@=7xDOjO^PkfM{Ko1&MZpJI?=IEO8hF-j=KD8)FF z5lEVVNmDRsmdTjT5+$5so??;C6eW^knZg28E1F^zC6;0xC7xmvC6U4sB?-h*KrEeN z8zqy%6wIJ$x7mvE8Y`pPWI=Y}`hxu8lJug~;=-Kxg5t{L{DO3&C=S=M^wd1Zf`TXx zm~<4UXHHpSv5|p+Srwgl;`5niV$tO4$ ev8e#1i&Q2TaQQJdP2SIy$jQVAfn1XnxupT=r&Z_x delta 230 zcmeAW-y_EB#LLUY00dJqIT9Eq@=7xDO;q2Ql**XJv_L48Ek$P`Q;O~!rcA~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rn$a6o?<`joyD4D@ zdEe}Z1^mMt+#eQQv?DgL>t?rw-A1x18mFP&D#m(wG0HfmSG>x?=5|oHm&}WjBPul= zbcrrm4~iWvO~196?Dp`0DB-T~3LM9q;g@JO)&X)?9nxOq-WNiTrT@n+1 zwQnL%NR39c0?YU?`j*-niUF$+&SBY_`Hx}w5P!B7?MW`Xk+NJY4;OGcw$jdYJ2nKL z;?vksd*8p&<#+)uVm&^Y-biILID6V_5Fz*CJ5y8qoKN92NBh~m!DK3XC_IHldo%3u zUuMa^oBStrvdA!a4961-@Wubk{#E=lvDE3fC(>}M?<~8*Fa*;mxKlAtO=oZ>YYpY;mPd0d#H6eg2D+rMY#Vmi4%wF7Mb=ARdk$2tBDVkl delta 1118 zcmZuw%}*0i5NEdC?ruxF-EDW z(L@{$ns`tT9!Lxjj4_@xUOh;-m?qvm`45<=^9lqi>}KZ8`BAqRbLodwkpnnD+MEY@l)H&@Lj-lp}tt{T(FlcHoCHC)ec$dWJa`aSXMd? zEKJ_G?!4@Fks*T+001X|IgL z7P8)~8k6~bxFG5H$D!c3vk>1ZK71!dy#lMDBN;JG5N!M@^+6prx}*3a81eE9aeqZ3m6SxZ$aqUhQubYC2HN&9gwf}bT>k;+!Gve1DC3y37BX@=Y0pmCRyyNI z&dnWy)%*e6^!Q-_KYJ>`jh&`ZoC|qE;;w_%0^>!oCQf9efz0!~0Ny3!#lvU; ze6Ja>gkQBWz2juB4Yz_egP_H*1~H<@>F%M3wx7Tqtg6dj>A@EpH| z+rtC2`;6q^vGI94#;PzH>4!m_k9;WL?~(D##dxO~=YjE{Y=Gj2@LGXd9;GS2ZPnlx Z!a_dKFXTIPMfd1#-KPh2RWH#a{{U08+Q0w+ diff --git a/lessons/__pycache__/models.cpython-37.pyc b/lessons/__pycache__/models.cpython-37.pyc index faf1e7ee1c4679d2576300666e370244ad30478a..e79cefe4649d38226618669fa348f927875497f3 100644 GIT binary patch delta 819 zcmYjPJ8#oa6!wkZj^l*Tw0Sgyls>R%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(R{ z#b6%&oRgN{lFuFbK@QtapTpq@X?Ad)fU0YB73Sr7)8N2y+*>TITFlaH-HzKPUb-Ez MHQPqiZL>A;7a_yf2LJ#7 diff --git a/lessons/__pycache__/schema.cpython-37.pyc b/lessons/__pycache__/schema.cpython-37.pyc index 845478db41b501e23d321bc5b31055ecc64ffd69..bde4bb56d629167faaf384c5689b31a755770d8d 100644 GIT binary patch literal 20339 zcmb_kS(h8fbw;Bb>tHr;I2>-`h@>cjqDB%$ZPW&GXlk)ImMtpIY14*5baOaEU@+>& z&?1e=aYV((aY8RioW)TRGJZ(>mgFsOS$;s?`{X1K$vHWG$VndZkmM!#zFXBB1{e-W z0jCz+s;>2`dvD#U#<}tFat5DU?U%lJ@mwbJFZ>aHEJW&X{=a5387Jcy?ToEL!#13( zW45y$(>6PnZFO>Xu9LU(oq}EH6zyWCWS0!)wc6#*m_631*cJJmYmav(?1|2#J=vME zr#jR2w9xbIOs8sBC0=On>de?P5-+xQcV_KbiI>`YI&=0M;#sHM-g}AVkG1!8_S^f7 z%v%|!;*5WqamL-u>Vey)eGrrhXA+c2O?eEIDQ6m#X-zo4GVAO?${w9^1e7^vFDQF8C8Kie`?t^cg{Kdnc*C9j^ft|l>3Bp3{M`@Pd)|8lg@Eaj%&(EP-@Nz zP)=yd)1W-%oCM{hrYwN+w6g%pf~GtJ$}`ThpggN7&w}!ta|)DGn(`bd&pW3nmoVP)FTT@;GQIuC|`8m1LZwUVJqHr-*7J8G3>fye2}Rv{eswE`h@|%RtO3oY+PA&TfHFvp6mPF zwP0Ek7TZnVf3MqWwu9Uy*YEj(b*brJ55~@}`QLKA53ac`9#TJQ*`Ty|ZKds8y1DKK zW0%}!>zeEFN6iWlgX zg}qLd47Q<4K9DHcHSb#YGImafc^UZZt$l+fEu8h1H#+WG&tJk+6dR4TX2)$bf^wtL z={g&2#w(4+M;pzyPAM*X&Gl>Unj2)_IUnR&9Q45IVSav|@g74H#QWcu7SCM%(04um z@=E)L-@feLSa#Q*Zm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p+Zy#iP%{(01vs-M2Vu>{rt1`z z?c_3x5ABE*4hJjldb~yRCmSA8`Xv5dyn9uA(m3d%R@Yh;cwJ$8T=u=y?0tM$Zod?_ zU=(*dDF~LA|HG1{a+zf>PWo?y-Mde$ACL%z@4DQfbI&>4Q~W$}O$58Lt-2GqoaULP Zn1Xj7JZO)ojtO5Mka=T=)fRyJ;vc}er-T3i literal 0 HcmV?d00001 diff --git a/lessons/models.py b/lessons/models.py index aa6f0aa..fc89e56 100644 --- a/lessons/models.py +++ b/lessons/models.py @@ -40,6 +40,8 @@ class Tests(models.Model): name = models.CharField(max_length=150) deadline = models.DateTimeField() lesson = models.ForeignKey(Lesson, on_delete=models.CASCADE) + is_timing = models.BooleanField(default=False) + time_sec = models.IntegerField(default=300) class Type(models.Model): name = models.TextField(max_length=150) @@ -48,6 +50,10 @@ class Type(models.Model): class TaskType(models.Model): name = models.TextField() + + def __str__(self) : + return self.name + class Task(models.Model): theory = models.TextField() practise = models.TextField() @@ -80,18 +86,4 @@ class Answer(models.Model): content = models.TextField() number = models.IntegerField() completed = models.BooleanField(default=False) - score = models.IntegerField(default=0) - - -@receiver(post_save, sender=Tests) -def _post_save_receiver_(sender, instance, created, **kwargs): - print(created, instance, instance.lesson.type_lesson.group.child_set.all()) - if created: - for child in instance.lesson.type_lesson.group.child_set.all(): - AnswerSheet.objects.create(child=child, completed=False, test=instance) - -'''@receiver(post_save, sender=Task) -def _post_save_receiver(sender, instance, created, **kwargs): - if created: - for child in instance.test.lesson.type_lesson.group.child_set.all(): - Answer.objects.create(number=instance.number, sheet=child.answersheet_set.all().filter(test=instance.test)[0], content="")''' \ No newline at end of file + score = models.IntegerField(default=0) \ No newline at end of file diff --git a/lessons/schema.py b/lessons/schema.py index fd4cee2..59c1b95 100644 --- a/lessons/schema.py +++ b/lessons/schema.py @@ -17,6 +17,45 @@ from .gqlTypes import * from graphql_relay.node.node import from_global_id +class CreateAnwerSheet(graphene.Mutation): + class Arguments: + child = graphene.ID() + test = graphene.ID() + + answer = graphene.Field(AnswerSheetType) + + def mutate(self, info, child, test): + answerSheet = AnswerSheet.objects.create( + test=Tests.objects.get(id=from_global_id(test)[1]), + child=Child.objects.get(id=from_global_id(child)[1]), + completed=False + ) + return CreateAnwerSheet(answer=answerSheet) + + +class CreateAnswer(graphene.Mutation): + class Arguments: + sheet = graphene.ID() + data = graphene.String() + number = graphene.Int() + + answer = graphene.Field(AnswerType) + + def mutate(self, info, sheet, data, number): + print(number,sheet, "number") + sheet = AnswerSheet.objects.get(id=from_global_id(sheet)[1]) + candidate = Answer.objects.filter(sheet__id=sheet.id, number=number) + print(candidate) + if len(candidate): + candidate.all().delete() + answer = Answer.objects.create( + sheet = sheet, + content = data, + number = number, + ) + return CreateAnswer(answer=answer) + + class CreateLesson(graphene.Mutation): class Arguments: name = graphene.String() @@ -27,6 +66,7 @@ class CreateLesson(graphene.Mutation): lesson = graphene.Field(LessonType) def mutate(self, info, name, descr, subject): + print(from_global_id(subject), subject) lesson = Lesson.objects.create(name=name, descr=descr, type_lesson= SubjectClassLocal.objects.get(id=from_global_id(subject)[1])) return CreateLesson(ok=True, lesson=lesson) @@ -57,7 +97,7 @@ class DeleteLesson(graphene.Mutation): ok = graphene.Boolean() def mutate(self, info, id): - lesson = Lesson.objects.get(id=id) + lesson = Lesson.objects.get(id=from_global_id(id)[1]) if lesson == None: return DeleteLesson(ok=False) lesson.delete() return DeleteLesson(ok=True) @@ -137,7 +177,7 @@ class createTask(graphene.Mutation): def mutate(self, info, test_id, theory, practise, number, max_score, Type): task = Tests.objects.get(id=from_global_id(test_id)[1]) - print(task) + print(from_global_id(Type)) m = createModel(model=Task, fields = { "theory": theory, "practise": practise, @@ -170,16 +210,31 @@ class updateTask(graphene.Mutation): m = updateModel(Task, task, { "theory": [theory, task.theory], "practise": [practise, task.practise], - "number": [number, task.number], "max_score": [max_score, task.max_score], "Type": [taskType(from_global_id(Type)[1]), task.Type], "is_autoCheck": [autoCheck, task.is_autoCheck], "autoCheckData": [autoCheckData, task.autoCheckData], "is_timing": [is_time, task.is_timing], - "time" : [time, task.time] + "time" : [time, task.time], }) return updateTask(task=m) +class ScoringTasks(graphene.Mutation): + class Arguments: + answerSheetId = graphene.ID() + score = graphene.Int() + number = graphene.Int() + + answer = graphene.Field(AnswerType) + + + def mutate(self, info, answerSheetId, score=0, number=0): + answer = AnswerSheet.objects.get(id=from_global_id(answerSheetId)[1]).answer_set.all().filter(number=number)[0] + answer.score = score + answer.completed = True + answer.save() + return ScoringTasks(answer=answer) + class deleteTask(graphene.Mutation): class Arguments: @@ -427,6 +482,14 @@ class Mutation(graphene.ObjectType): deleteMaterial = DeleteMaterial.Field() changeMaterial = ChangeMaterail.Field() + + create_anwer_sheet = CreateAnwerSheet.Field() + + create_answer = CreateAnswer.Field() + + + scoring_tasks = ScoringTasks.Field() + class Query(graphene.ObjectType): all_test = DjangoFilterConnectionField(TestsType) @@ -460,5 +523,7 @@ class Query(graphene.ObjectType): tasks = DjangoFilterConnectionField(TaskType) task = relay.Node.Field(TaskType) + + schema = graphene.Schema(query=Query) \ No newline at end of file