Make level description a text field

This commit is contained in:
2022-01-02 20:53:33 +00:00
parent 945fb393c0
commit f094ace862
2 changed files with 25 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
# Generated by Django 3.1.13 on 2022-01-02 20:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('training', '0011_auto_20220102_1106'),
]
operations = [
migrations.AlterField(
model_name='traininglevel',
name='department',
field=models.IntegerField(blank=True, choices=[(0, 'Sound'), (1, 'Lighting'), (2, 'Power'), (3, 'Rigging'), (4, 'Haulage')], null=True),
),
migrations.AlterField(
model_name='traininglevel',
name='description',
field=models.TextField(blank=True),
),
]

View File

@@ -127,7 +127,7 @@ class TrainingItemQualification(models.Model):
# Levels
@reversion.register(follow=["requirements"])
class TrainingLevel(models.Model, RevisionMixin):
description = models.CharField(max_length=120, blank=True)
description = models.TextField(blank=True)
TA = 0
TECHNICIAN = 1
SUPERVISOR = 2
@@ -148,7 +148,7 @@ class TrainingLevel(models.Model, RevisionMixin):
(RIGGING, 'Rigging'),
(HAULAGE, 'Haulage'),
)
department = models.IntegerField(choices=DEPARTMENTS, null=True) # N.B. Technical Assistant does not have a department
department = models.IntegerField(choices=DEPARTMENTS, null=True, blank=True) # N.B. Technical Assistant does not have a department
level = models.IntegerField(choices=CHOICES)
prerequisite_levels = models.ManyToManyField('self', related_name='prerequisites', symmetrical=False, blank=True)
icon = models.CharField(null=True, blank=True, max_length=20)