Skip to content

Commit

Permalink
Map new field and new migration file
Browse files Browse the repository at this point in the history
  • Loading branch information
susilnem committed Mar 6, 2024
1 parent 8e0bfe3 commit 874ea36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 3.2.23 on 2024-03-01 04:53
# Generated by Django 3.2.23 on 2024-03-06 05:37

from django.db import migrations, models

Expand Down Expand Up @@ -110,11 +110,6 @@ class Migration(migrations.Migration):
name='other_actor_file',
field=models.ManyToManyField(blank=True, related_name='dref_other_actor_file', to='dref.DrefFile', verbose_name='Other Actor file'),
),
migrations.AddField(
model_name='dref',
name='selection_criteria_early_action',
field=models.TextField(blank=True, help_text='For population at risk for the early actions', null=True, verbose_name='selection criteria for early action'),
),
migrations.AddField(
model_name='dref',
name='selection_criteria_expected_impacted_population',
Expand All @@ -125,21 +120,11 @@ class Migration(migrations.Migration):
name='targeting_expected_impacted_population',
field=models.TextField(blank=True, help_text='Targeting of the expected impacted population if the disaster materialises for the immediate response activities.', null=True, verbose_name='targeting expected impacted population'),
),
migrations.AddField(
model_name='dref',
name='targeting_population_early_action',
field=models.TextField(blank=True, null=True, verbose_name='Targeting of population at risk for the early actions'),
),
migrations.AddField(
model_name='dref',
name='threshold_for_early_action',
field=models.TextField(blank=True, null=True, verbose_name='threshold for early action'),
),
migrations.AddField(
model_name='identifiedneed',
name='current_need',
field=models.TextField(blank=True, null=True, verbose_name='current need'),
),
migrations.AddField(
model_name='identifiedneed',
name='expected_need',
Expand Down
15 changes: 3 additions & 12 deletions dref/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Title(models.TextChoices):

title = models.CharField(max_length=255, verbose_name=_("title"), choices=Title.choices)
description = models.TextField(verbose_name=_("description"), blank=True, null=True)
current_need = models.TextField(verbose_name=_("current need"), blank=True, null=True)
#description is used for "current need" and new field `expected_need` is added for expected need
expected_need = models.TextField(verbose_name=_("expected need"), blank=True, null=True)

class Meta:
Expand Down Expand Up @@ -370,11 +370,7 @@ class Status(models.IntegerChoices):
help_text=_("Any identified gaps/limitations in the assessment"),
)
people_assisted = models.TextField(verbose_name=_("people assisted"), blank=True, null=True)
targeting_population_early_action = models.TextField(
verbose_name=_("Targeting of population at risk for the early actions"),
blank=True,
null=True,
)
#`people_assisted` field is used for targeting population for early action and new field `targeting_expected_impacted_population` is added for expected impacted population
targeting_expected_impacted_population = models.TextField(
verbose_name=_("targeting expected impacted population"),
blank=True,
Expand All @@ -384,12 +380,7 @@ class Status(models.IntegerChoices):
selection_criteria = models.TextField(
verbose_name=_("selection criteria"), blank=True, null=True, help_text=_("Selection criteria for affected people")
)
selection_criteria_early_action = models.TextField(
verbose_name=_("selection criteria for early action"),
blank=True,
null=True,
help_text=_("For population at risk for the early actions")
)
#`selection_criteria` is used for early action and new field `selection_criteria_expected_impacted_population` is added for expected impacted population
selection_criteria_expected_impacted_population = models.TextField(
verbose_name=_("selection criteria for expected impacted population"),
blank=True,
Expand Down

0 comments on commit 874ea36

Please sign in to comment.