diff options
-rw-r--r-- | ctrack/organisations/management/commands/populate_db.py | 2 | ||||
-rw-r--r-- | ctrack/register/migrations/0004_engagementevent_comments.py | 19 | ||||
-rw-r--r-- | ctrack/register/migrations/0005_auto_20200303_0909.py | 18 | ||||
-rw-r--r-- | ctrack/register/models.py | 1 | ||||
-rw-r--r-- | ctrack/register/tests/factories.py | 3 |
5 files changed, 41 insertions, 2 deletions
diff --git a/ctrack/organisations/management/commands/populate_db.py b/ctrack/organisations/management/commands/populate_db.py index 31e2447..7f8ec5d 100644 --- a/ctrack/organisations/management/commands/populate_db.py +++ b/ctrack/organisations/management/commands/populate_db.py @@ -139,7 +139,7 @@ class Command(BaseCommand): etf1 = EngagementTypeFactory(descriptor="Information Notice") etf2 = EngagementTypeFactory(descriptor="Designation Letter") - etf3 = EngagementTypeFactory(descriptor="CAF - Initial Submission") + etf3 = EngagementTypeFactory(descriptor="CAF - Initial Submission", enforcement_instrument=False) ee1 = EngagementEventFactory.create(type=etf1, user=user, participants=[p1, p2]) ee2 = EngagementEventFactory.create(type=etf2, user=user, participants=[p3]) diff --git a/ctrack/register/migrations/0004_engagementevent_comments.py b/ctrack/register/migrations/0004_engagementevent_comments.py new file mode 100644 index 0000000..3379b03 --- /dev/null +++ b/ctrack/register/migrations/0004_engagementevent_comments.py @@ -0,0 +1,19 @@ +# Generated by Django 2.2.9 on 2020-03-03 09:06 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('register', '0003_engagementevent_short_description'), + ] + + operations = [ + migrations.AddField( + model_name='engagementevent', + name='comments', + field=models.TextField(default='No comment', max_length=1000), + preserve_default=False, + ), + ] diff --git a/ctrack/register/migrations/0005_auto_20200303_0909.py b/ctrack/register/migrations/0005_auto_20200303_0909.py new file mode 100644 index 0000000..94551a5 --- /dev/null +++ b/ctrack/register/migrations/0005_auto_20200303_0909.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.9 on 2020-03-03 09:09 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('register', '0004_engagementevent_comments'), + ] + + operations = [ + migrations.AlterField( + model_name='engagementevent', + name='comments', + field=models.TextField(blank=True, max_length=1000, null=True), + ), + ] diff --git a/ctrack/register/models.py b/ctrack/register/models.py index 60733c5..ef19ca6 100644 --- a/ctrack/register/models.py +++ b/ctrack/register/models.py @@ -47,6 +47,7 @@ class EngagementEvent(models.Model): related_caf = models.ForeignKey( CAF, blank=True, on_delete=models.CASCADE, null=True ) + comments = models.TextField(max_length=1000, blank=True, null=True) def __str__(self): d = self.date.date() diff --git a/ctrack/register/tests/factories.py b/ctrack/register/tests/factories.py index 963c1a5..c93bdda 100644 --- a/ctrack/register/tests/factories.py +++ b/ctrack/register/tests/factories.py @@ -5,7 +5,7 @@ import random from django.utils import timezone from django.contrib.auth import get_user_model -from factory import post_generation +from factory import post_generation, Faker from ctrack.register.models import EngagementEvent from ctrack.register.models import EngagementType @@ -67,3 +67,4 @@ class EngagementEventFactory(factory.DjangoModelFactory): response_date_requested = factory.LazyFunction(timezone.now) response_received = None related_caf = None + comments = Faker("paragraph", nb_sentences=5, variable_nb_sentences=True, ext_word_list=None) |