added missing mail field for department

This commit is contained in:
faraphel-gima 2023-11-28 10:54:31 +01:00
parent e99277f438
commit e3bb44a990
2 changed files with 3 additions and 2 deletions

View file

@ -1,7 +1,7 @@
from django.contrib import admin
from .models import Department, StudentGroup, TeachingUnit, StudentCard, TeachingSession, Attendance, Absence, \
AbsenceAttachment
from .models import (Department, StudentGroup, TeachingUnit, StudentCard, TeachingSession, Attendance, Absence,
AbsenceAttachment, User)
# Register your models here.

View file

@ -27,6 +27,7 @@ class Department(models.Model):
id: uuid.UUID = models.UUIDField(default=uuid.uuid4, primary_key=True, editable=False, max_length=36)
name: str = models.CharField(max_length=32)
mail: str = models.EmailField()
managers = models.ManyToManyField(to=get_user_model(), blank=True, related_name="managing_departments")
teachers = models.ManyToManyField(to=get_user_model(), blank=True, related_name="teaching_departments")