From 874ea366c18557092509b6464856fa50724d51d5 Mon Sep 17 00:00:00 2001 From: Sushil Tiwari Date: Wed, 6 Mar 2024 11:24:24 +0545 Subject: [PATCH] Map new field and new migration file --- ...40301_0453.py => 0075_auto_20240306_0537.py} | 17 +---------------- dref/models.py | 15 +++------------ 2 files changed, 4 insertions(+), 28 deletions(-) rename dref/migrations/{0075_auto_20240301_0453.py => 0075_auto_20240306_0537.py} (90%) diff --git a/dref/migrations/0075_auto_20240301_0453.py b/dref/migrations/0075_auto_20240306_0537.py similarity index 90% rename from dref/migrations/0075_auto_20240301_0453.py rename to dref/migrations/0075_auto_20240306_0537.py index 1ce1d7c3d..596bd460a 100644 --- a/dref/migrations/0075_auto_20240301_0453.py +++ b/dref/migrations/0075_auto_20240306_0537.py @@ -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 @@ -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', @@ -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', diff --git a/dref/models.py b/dref/models.py index 4e8335e87..cb47f54cd 100644 --- a/dref/models.py +++ b/dref/models.py @@ -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: @@ -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, @@ -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,