aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations/management/commands
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-03-15 16:21:52 +0000
committerMatthew Lemon <lemon@matthewlemon.com>2020-03-15 16:21:52 +0000
commitac87c8494fab9f7cf1c97ec1e5dbe46eb28899de (patch)
tree6af2e75d9a0a8662b8f18d44691038663e8be8f9 /ctrack/organisations/management/commands
parent536cf89a33c59cff512df6de76cef0a8aa788828 (diff)
can populate four Objectives
Diffstat (limited to '')
-rw-r--r--ctrack/organisations/management/commands/populate_db.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/ctrack/organisations/management/commands/populate_db.py b/ctrack/organisations/management/commands/populate_db.py
index 80ea5d0..d7f9bc4 100644
--- a/ctrack/organisations/management/commands/populate_db.py
+++ b/ctrack/organisations/management/commands/populate_db.py
@@ -4,7 +4,7 @@ from random import randint, choice
from django.core.management import BaseCommand
from django.core.management import CommandParser
-from ctrack.assessments.models import CAFSelfAssessment
+from ctrack.assessments.models import CAFSelfAssessment, CAFObjective
from ctrack.caf.models import CAF
from ctrack.caf.tests.factories import (
GradingFactory,
@@ -180,7 +180,18 @@ class Command(BaseCommand):
caf_id=_caf2.id, completer_id=_completer.id, comments="Random Comments"
)
+ # We want to simulate 4 CAF Objectives
+ c_obj1 = CAFObjective.objects.create(name="Objective A: Major Issue A",
+ description="An important objective to fix the world.", order_id=1)
+ c_obj2 = CAFObjective.objects.create(name="Objective B: Major Issue B",
+ description="An important objective to fix the world.", order_id=2)
+ c_obj3 = CAFObjective.objects.create(name="Objective C: Major Issue C",
+ description="An important objective to fix the world.", order_id=3)
+ c_obj4 = CAFObjective.objects.create(name="Objective D: Major Issue D",
+ description="An important objective to fix the world.", order_id=4)
+
# TODO - adapt this so that it records more than just Persons created
+
self.stdout.write(
self.style.SUCCESS(
f"Created {number} Person object[s]! Go forth and multiply."
@@ -199,4 +210,3 @@ class Command(BaseCommand):
ApplicableSystemFactory.create(
name=random.choice(fnames), organisation=org, caf=caf,
)
-