mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-29 07:53:23 +00:00
feat: Gestion des profils des enseignants / Visualisation d'une classe [#4]
This commit is contained in:
@ -17,8 +17,8 @@ import json
|
||||
from . import validator
|
||||
from .models import Profil
|
||||
|
||||
from GestionLogin.serializers import ProfilSerializer, ProfilUpdateSerializer
|
||||
from GestionInscriptions.models import FicheInscription
|
||||
from GestionInscriptions.serializers import ProfilSerializer
|
||||
from GestionInscriptions.signals import clear_cache
|
||||
import GestionInscriptions.mailManager as mailer
|
||||
import GestionInscriptions.util as util
|
||||
@ -83,7 +83,7 @@ class ProfilView(APIView):
|
||||
def put(self, request, _id):
|
||||
data=JSONParser().parse(request)
|
||||
profil = Profil.objects.get(id=_id)
|
||||
profil_serializer = ProfilSerializer(profil, data=data)
|
||||
profil_serializer = ProfilUpdateSerializer(profil, data=data)
|
||||
if profil_serializer.is_valid():
|
||||
profil_serializer.save()
|
||||
return JsonResponse("Updated Successfully", safe=False)
|
||||
@ -143,6 +143,7 @@ class LoginView(APIView):
|
||||
'errorFields':errorFields,
|
||||
'errorMessage':retour,
|
||||
'profil':user.id if user else -1,
|
||||
'droit':user.droit if user else -1,
|
||||
#'jwtToken':jwt_token if profil != -1 else ''
|
||||
}, safe=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user