aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pyblackbird_cc/resources/migrations/0002_alter_resource_additional_resource_category_and_more.py24
-rw-r--r--pyblackbird_cc/resources/models.py2
2 files changed, 25 insertions, 1 deletions
diff --git a/pyblackbird_cc/resources/migrations/0002_alter_resource_additional_resource_category_and_more.py b/pyblackbird_cc/resources/migrations/0002_alter_resource_additional_resource_category_and_more.py
new file mode 100644
index 0000000..3b70450
--- /dev/null
+++ b/pyblackbird_cc/resources/migrations/0002_alter_resource_additional_resource_category_and_more.py
@@ -0,0 +1,24 @@
+# Generated by Django 5.0.4 on 2024-05-15 20:00
+
+import django.db.models.deletion
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('resources', '0001_initial'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='resource',
+ name='additional_resource_category',
+ field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='additional_resource_category', to='resources.resourcecategory'),
+ ),
+ 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),
+ ),
+ ]
diff --git a/pyblackbird_cc/resources/models.py b/pyblackbird_cc/resources/models.py
index b11bcb9..6a279dd 100644
--- a/pyblackbird_cc/resources/models.py
+++ b/pyblackbird_cc/resources/models.py
@@ -36,6 +36,7 @@ class Resource(models.Model):
"ResourceCategory",
on_delete=models.CASCADE,
null=True,
+ blank=True,
related_name="additional_resource_category",
)
description = models.TextField(max_length=1000, null=False, blank=False)
@@ -48,7 +49,6 @@ class Resource(models.Model):
)
curriculum = models.CharField(
max_length=20,
- null=True,
default="English",
blank=True,
choices=[