From e13cc61c3a1dabff7fc890b196da9c9c621ceca4 Mon Sep 17 00:00:00 2001 From: tyboro2002 Date: Mon, 8 Apr 2024 19:13:32 +0200 Subject: [PATCH 1/2] chore: add make teacher script --- backend/api/management/commands/makeAdmin.py | 4 ++-- .../api/management/commands/makeTeacher.py | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 backend/api/management/commands/makeTeacher.py diff --git a/backend/api/management/commands/makeAdmin.py b/backend/api/management/commands/makeAdmin.py index fc24c7fb..c99b7053 100644 --- a/backend/api/management/commands/makeAdmin.py +++ b/backend/api/management/commands/makeAdmin.py @@ -4,7 +4,7 @@ class Command(BaseCommand): - help = 'seed the db with data' + help = 'make yourself admin' def add_arguments(self, parser): parser.add_argument('username', type=str, help='The username of the student user to make admin') @@ -18,4 +18,4 @@ def handle(self, *args, **options): student = student.get() student.is_staff = True student.save() - self.stdout.write(self.style.SUCCESS('Successfully made yourself admin!')) + self.stdout.write(self.style.SUCCESS('Successfully made the user admin!')) diff --git a/backend/api/management/commands/makeTeacher.py b/backend/api/management/commands/makeTeacher.py new file mode 100644 index 00000000..31417606 --- /dev/null +++ b/backend/api/management/commands/makeTeacher.py @@ -0,0 +1,21 @@ +from django.core.management.base import BaseCommand +from api.models.student import Student +from api.models.teacher import Teacher + + +class Command(BaseCommand): + + help = 'make yourself teacher' + + def add_arguments(self, parser): + parser.add_argument('username', type=str, help='The username of the student user to make teacher') + + def handle(self, *args, **options): + username = options['username'] + student = Student.objects.filter(username=username) + if student.count() == 0: + self.stdout.write(self.style.ERROR('User not found, first log in !')) + return + student = student.get() + Teacher.objects.create(id=student.id, create_time=student.create_time) + self.stdout.write(self.style.SUCCESS('Successfully made the user teacher!')) From 0cb4bc466891283f53d99ddbc2616c400a831122 Mon Sep 17 00:00:00 2001 From: EwoutV Date: Mon, 8 Apr 2024 21:57:17 +0200 Subject: [PATCH 2/2] fix: added psychology faculty icon --- .../Psychologie_PedagogischeWetenschappen.png | Bin 0 -> 844 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 frontend/src/assets/img/faculties/Psychologie_PedagogischeWetenschappen.png diff --git a/frontend/src/assets/img/faculties/Psychologie_PedagogischeWetenschappen.png b/frontend/src/assets/img/faculties/Psychologie_PedagogischeWetenschappen.png new file mode 100644 index 0000000000000000000000000000000000000000..11bd1f3057a5fe9a0b160ce3124683e2b295bea0 GIT binary patch literal 844 zcmV-S1GD^zP)Vtzgeu8#*8D1K##wc(Q87H`V8Qs z(c^(winIX?0c4_W%2od^h_g)-X&?HVcp=+-6kR(T?af<9q0ApTf756wHlt^E!>IrRLDRcqgj80#6c!@!YOy9V} z5+OuV00*pJ3KAnht^n{wOtuOGnwCP3D&HuPLs9?0QkvN*fM@JGH%9*tJ-$U1oe@H$ z%kq*wu~#xPmu)o{s&tKB3xp7P$a2C`uVg_pbA^7+GM`!qUn25lSEaT(Gg^e7p5y*t z6}gu0gn|O%Du}d=7I*Bqj_@Ti74;pKIZH2R<@kd2p3z$aUm`Q{QtcbsSu>v%CG<|0 zxjKD_Y02FxVbIg$ju|k0o;hdz(CA%)5F(#M{g^7f;dP6_(G@eXb-!>~j63h2KDcMJ z+F?%rX!EE1=9|i>X%;E#x#jazHhjcq-Dg`OlwXR_G+w>vD-}@0o^w?%M3jGJxh4Oo zIFJ=gb7~Q~{mz*5fs;66eIRUoXpsmeg2b44+NsFFY7ygvIAMl+K$Gf3W(Y%^~Z%o#FN~@w01<@nFJyc>2QYucbr-21B6W$tQVp%dMpuxh(6Wn zuOf+v%(>+X>)>}~^jIR)M>=8>T8+Mi8p8z#sHxFni5O>gII58@Afd1pMSRsrxwTfo zD)?0)gov+iEbH?|$O*BmhU-q%2qH0ds;KZG(l|BXNu+UVz=KF5)qn?)vKpySW4tak z;7FuO4V$=eBXA+2)hL7-Izo?Y{tsC>Tms^L=~^lB*tly=*#14;G;E194O=3O0)XGz Wq^_uQT2QV40000