mirror of
https://git.v0id.ovh/n3wt-innov/n3wt-school.git
synced 2026-01-28 23:43:22 +00:00
feat: Gestion des profils des enseignants / Visualisation d'une classe [#4]
This commit is contained in:
@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user