feat: Gestion des profils des enseignants / Visualisation d'une classe [#4]

This commit is contained in:
N3WT DE COMPET
2024-11-23 20:02:51 +01:00
parent af0cd1c840
commit 81d1dfa9a7
26 changed files with 792 additions and 178 deletions

View File

@ -1,4 +1,5 @@
from django.db import models
from GestionLogin.models import Profil
class Specialite(models.Model):
nom = models.CharField(max_length=100)
@ -13,6 +14,7 @@ class Enseignant(models.Model):
prenom = models.CharField(max_length=100)
mail = models.EmailField(unique=True)
specialite = models.ForeignKey(Specialite, on_delete=models.SET_NULL, null=True, blank=True, related_name='enseignants')
profilAssocie = models.ForeignKey(Profil, on_delete=models.CASCADE, null=True, blank=True)
def __str__(self):
return f"{self.nom} {self.prenom}"