Adde Aircraft class and associate students with aircrafts

This commit is contained in:
2025-11-28 10:16:01 +01:00
parent 33c610dcbc
commit de39913275
11 changed files with 190 additions and 67 deletions

View File

@@ -10,14 +10,18 @@ class CourseTypes(models.TextChoices):
DISTANCE = "DL", _("DISTANCE")
OTHER = "OTHER",_("OTHER")
class Course(models.Model):
# Add colors according to table from Alessia
COLOR_PALETTE = [
("#ffffff","WHITE"),
("#bfbfbf","GREY"),
("#ff0000", "RED"),
("#00ff00", "GREEN"),
("#0000ff", "BLUE")
("#ffc000", "ORANGE"),
("#ffff00", "YELLOW"),
("#92d050", "GREEN"),
("#00b0f0", "CYAN"),
("#b1a0c7", "MAGENTA"),
("#fabcfb", "PINK"),
("#f27ae4", "VIOLET"),
]
id = models.AutoField(
@@ -43,8 +47,8 @@ class Course(models.Model):
)
color = ColorField (
samples=COLOR_PALETTE,
verbose_name=_("Binder Color")
verbose_name=_("Binder Color"),
samples=COLOR_PALETTE
)
def __str__(self):