diff --git a/consultation_analyser/consultations/migrations/0001_initial.py b/consultation_analyser/consultations/migrations/0001_initial.py index a35d7cda..6df37ad0 100644 --- a/consultation_analyser/consultations/migrations/0001_initial.py +++ b/consultation_analyser/consultations/migrations/0001_initial.py @@ -6,105 +6,124 @@ class Migration(migrations.Migration): - initial = True - dependencies = [ - ] + dependencies = [] operations = [ migrations.CreateModel( - name='Consultation', + name="Consultation", fields=[ - ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('created_at', models.DateTimeField(auto_now_add=True)), - ('modified_at', models.DateTimeField(auto_now=True)), - ('name', models.CharField(max_length=256)), - ('slug', models.CharField(max_length=256)), + ("id", models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ("created_at", models.DateTimeField(auto_now_add=True)), + ("modified_at", models.DateTimeField(auto_now=True)), + ("name", models.CharField(max_length=256)), + ("slug", models.CharField(max_length=256)), ], options={ - 'ordering': ['created_at'], - 'abstract': False, + "ordering": ["created_at"], + "abstract": False, }, ), migrations.CreateModel( - name='ConsultationResponse', + name="ConsultationResponse", fields=[ - ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('created_at', models.DateTimeField(auto_now_add=True)), - ('modified_at', models.DateTimeField(auto_now=True)), + ("id", models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ("created_at", models.DateTimeField(auto_now_add=True)), + ("modified_at", models.DateTimeField(auto_now=True)), ], options={ - 'ordering': ['created_at'], - 'abstract': False, + "ordering": ["created_at"], + "abstract": False, }, ), migrations.CreateModel( - name='Theme', + name="Theme", fields=[ - ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('created_at', models.DateTimeField(auto_now_add=True)), - ('modified_at', models.DateTimeField(auto_now=True)), - ('label', models.CharField(blank=True, max_length=256)), - ('summary', models.TextField(blank=True)), - ('keywords', models.JSONField(default=list)), + ("id", models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ("created_at", models.DateTimeField(auto_now_add=True)), + ("modified_at", models.DateTimeField(auto_now=True)), + ("label", models.CharField(blank=True, max_length=256)), + ("summary", models.TextField(blank=True)), + ("keywords", models.JSONField(default=list)), ], options={ - 'ordering': ['created_at'], - 'abstract': False, + "ordering": ["created_at"], + "abstract": False, }, ), migrations.CreateModel( - name='Section', + name="Section", fields=[ - ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('created_at', models.DateTimeField(auto_now_add=True)), - ('modified_at', models.DateTimeField(auto_now=True)), - ('name', models.TextField()), - ('slug', models.CharField(max_length=256)), - ('consultation', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='consultations.consultation')), + ("id", models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ("created_at", models.DateTimeField(auto_now_add=True)), + ("modified_at", models.DateTimeField(auto_now=True)), + ("name", models.TextField()), + ("slug", models.CharField(max_length=256)), + ( + "consultation", + models.ForeignKey( + null=True, on_delete=django.db.models.deletion.CASCADE, to="consultations.consultation" + ), + ), ], ), migrations.CreateModel( - name='Question', + name="Question", fields=[ - ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('created_at', models.DateTimeField(auto_now_add=True)), - ('modified_at', models.DateTimeField(auto_now=True)), - ('text', models.CharField()), - ('slug', models.CharField(max_length=256)), - ('has_free_text', models.BooleanField(default=False)), - ('multiple_choice_options', models.JSONField(null=True)), - ('section', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='consultations.section')), + ("id", models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ("created_at", models.DateTimeField(auto_now_add=True)), + ("modified_at", models.DateTimeField(auto_now=True)), + ("text", models.CharField()), + ("slug", models.CharField(max_length=256)), + ("has_free_text", models.BooleanField(default=False)), + ("multiple_choice_options", models.JSONField(null=True)), + ( + "section", + models.ForeignKey( + null=True, on_delete=django.db.models.deletion.CASCADE, to="consultations.section" + ), + ), ], options={ - 'ordering': ['created_at'], - 'abstract': False, + "ordering": ["created_at"], + "abstract": False, }, ), migrations.CreateModel( - name='Answer', + name="Answer", fields=[ - ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('created_at', models.DateTimeField(auto_now_add=True)), - ('modified_at', models.DateTimeField(auto_now=True)), - ('multiple_choice_responses', models.JSONField(null=True)), - ('free_text', models.TextField(null=True)), - ('consultation_response', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='consultations.consultationresponse')), - ('question', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='consultations.question')), - ('theme', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='consultations.theme')), + ("id", models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ("created_at", models.DateTimeField(auto_now_add=True)), + ("modified_at", models.DateTimeField(auto_now=True)), + ("multiple_choice_responses", models.JSONField(null=True)), + ("free_text", models.TextField(null=True)), + ( + "consultation_response", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, to="consultations.consultationresponse" + ), + ), + ( + "question", + models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="consultations.question"), + ), + ( + "theme", + models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to="consultations.theme"), + ), ], options={ - 'ordering': ['created_at'], - 'abstract': False, + "ordering": ["created_at"], + "abstract": False, }, ), migrations.AddConstraint( - model_name='section', - constraint=models.UniqueConstraint(fields=('slug', 'consultation'), name='unique_section_consultation'), + model_name="section", + constraint=models.UniqueConstraint(fields=("slug", "consultation"), name="unique_section_consultation"), ), migrations.AddConstraint( - model_name='question', - constraint=models.UniqueConstraint(fields=('slug', 'section'), name='unique_question_section'), + model_name="question", + constraint=models.UniqueConstraint(fields=("slug", "section"), name="unique_question_section"), ), ] diff --git a/prototype/app/assets/sass/application.scss b/prototype/app/assets/sass/application.scss index 390010ac..fa359c9b 100644 --- a/prototype/app/assets/sass/application.scss +++ b/prototype/app/assets/sass/application.scss @@ -1,7 +1,7 @@ // // For guidance on how to add CSS and SCSS see: // https://prototype-kit.service.gov.uk/docs/adding-css-javascript-and-images -// +// :root { --iai-pink: #b62777; diff --git a/prototype/app/views/question-responses.html b/prototype/app/views/question-responses.html index c47142f9..3dbee706 100644 --- a/prototype/app/views/question-responses.html +++ b/prototype/app/views/question-responses.html @@ -199,7 +199,7 @@

Filters

{% set filteredResponses = data.questions|filter(data.keyword) %} - +
Responses