diff options
author | Matthew Lemon <y@yulqen.org> | 2024-07-11 16:35:10 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-07-11 16:35:10 +0100 |
commit | 375aec43a2badc5eef86d528745908cb2f572bb7 (patch) | |
tree | a4b5d8c19b51df7328dbd1aa9c839ad19949fa2c /pyblackbird_cc | |
parent | 0309afdf0f8ceb9695e32e6e88b32a603e5a6c04 (diff) |
Curriculum is optional and age ranges are fixed
Diffstat (limited to 'pyblackbird_cc')
4 files changed, 46 insertions, 6 deletions
diff --git a/pyblackbird_cc/resources/forms.py b/pyblackbird_cc/resources/forms.py index d0fb001..35c5034 100644 --- a/pyblackbird_cc/resources/forms.py +++ b/pyblackbird_cc/resources/forms.py @@ -67,6 +67,7 @@ class ResourceCreateForm(forms.Form): ) curriculum = forms.ChoiceField( choices=CURRICULUM_CHOICES, + required=False, ) main_resource_category = forms.ModelChoiceField( queryset=ResourceCategory.objects.all(), diff --git a/pyblackbird_cc/resources/migrations/0010_alter_resource_age_range.py b/pyblackbird_cc/resources/migrations/0010_alter_resource_age_range.py new file mode 100644 index 0000000..49c7a2c --- /dev/null +++ b/pyblackbird_cc/resources/migrations/0010_alter_resource_age_range.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.4 on 2024-07-11 14:47 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resources', '0009_alter_resource_feature_slot'), + ] + + operations = [ + migrations.AlterField( + model_name='resource', + name='age_range', + field=models.CharField(choices=[('Preschool (3-4yrs)', 'Preschool (3-4yrs)'), ('Nursery (2-5yrs)', 'Nursery (2-5yrs)'), ('Reception (4-5yrs)', 'Reception (4-5yrs)'), ('Year 1 (5-6yrs)', 'Year 1 (5-6yrs)'), ('Year 2 (6-7yrs)', 'Year 2 (6-7yrs)'), ('Early Years (0-5yrs)', 'Early Years (0-5yrs)'), ('Keystage 1 (5-7yrs)', 'Keystage 1 (5-7yrs)'), ('Keystage 2 (7-11yrs)', 'Keystage 2 (7-11yrs)'), ('Age not applicable', 'Age not applicable')], default='5-7', max_length=20), + ), + ] diff --git a/pyblackbird_cc/resources/migrations/0011_alter_resource_curriculum.py b/pyblackbird_cc/resources/migrations/0011_alter_resource_curriculum.py new file mode 100644 index 0000000..5e1b193 --- /dev/null +++ b/pyblackbird_cc/resources/migrations/0011_alter_resource_curriculum.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.4 on 2024-07-11 14:50 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('resources', '0010_alter_resource_age_range'), + ] + + operations = [ + migrations.AlterField( + model_name='resource', + name='curriculum', + field=models.CharField(blank=True, choices=[('No curriculum', 'No curriculum'), ('English', 'English'), ('Scottish', 'Scottish')], default='English', max_length=20, null=True), + ), + ] diff --git a/pyblackbird_cc/resources/models.py b/pyblackbird_cc/resources/models.py index 33fd678..c23fd34 100644 --- a/pyblackbird_cc/resources/models.py +++ b/pyblackbird_cc/resources/models.py @@ -7,12 +7,14 @@ CURRICULUM_CHOICES = [ ] AGE_RANGE_CHOICES = [ - ("3-5", "3-5"), - ("5-7", "5-7"), - ("7-11", "7-11"), - ("11-14", "11-14"), - ("14-16", "14-16"), - ("16+", "16+"), + ("Preschool (3-4yrs)", "Preschool (3-4yrs)"), + ("Nursery (2-5yrs)", "Nursery (2-5yrs)"), + ("Reception (4-5yrs)", "Reception (4-5yrs)"), + ("Year 1 (5-6yrs)", "Year 1 (5-6yrs)"), + ("Year 2 (6-7yrs)", "Year 2 (6-7yrs)"), + ("Early Years (0-5yrs)", "Early Years (0-5yrs)"), + ("Keystage 1 (5-7yrs)", "Keystage 1 (5-7yrs)"), + ("Keystage 2 (7-11yrs)", "Keystage 2 (7-11yrs)"), ("Age not applicable", "Age not applicable"), ] @@ -74,6 +76,7 @@ class Resource(models.Model): max_length=20, default="English", blank=True, + null=True, choices=[ ("No curriculum", "No curriculum"), ("English", "English"), |