mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-20 15:02:31 +00:00
Make level description a text field
This commit is contained in:
23
training/migrations/0012_auto_20220102_2051.py
Normal file
23
training/migrations/0012_auto_20220102_2051.py
Normal 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),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -127,7 +127,7 @@ class TrainingItemQualification(models.Model):
|
|||||||
# Levels
|
# Levels
|
||||||
@reversion.register(follow=["requirements"])
|
@reversion.register(follow=["requirements"])
|
||||||
class TrainingLevel(models.Model, RevisionMixin):
|
class TrainingLevel(models.Model, RevisionMixin):
|
||||||
description = models.CharField(max_length=120, blank=True)
|
description = models.TextField(blank=True)
|
||||||
TA = 0
|
TA = 0
|
||||||
TECHNICIAN = 1
|
TECHNICIAN = 1
|
||||||
SUPERVISOR = 2
|
SUPERVISOR = 2
|
||||||
@@ -148,7 +148,7 @@ class TrainingLevel(models.Model, RevisionMixin):
|
|||||||
(RIGGING, 'Rigging'),
|
(RIGGING, 'Rigging'),
|
||||||
(HAULAGE, 'Haulage'),
|
(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)
|
level = models.IntegerField(choices=CHOICES)
|
||||||
prerequisite_levels = models.ManyToManyField('self', related_name='prerequisites', symmetrical=False, blank=True)
|
prerequisite_levels = models.ManyToManyField('self', related_name='prerequisites', symmetrical=False, blank=True)
|
||||||
icon = models.CharField(null=True, blank=True, max_length=20)
|
icon = models.CharField(null=True, blank=True, max_length=20)
|
||||||
|
|||||||
Reference in New Issue
Block a user