From f06d5d813c542a4dcc5450f0be10c6f4cc5ad1b3 Mon Sep 17 00:00:00 2001 From: Sushil Tiwari Date: Fri, 1 Mar 2024 10:45:54 +0545 Subject: [PATCH] Add subfields and migations file --- dref/migrations/0075_auto_20240301_0453.py | 173 +++++++++++++++++++++ dref/models.py | 63 ++++++++ 2 files changed, 236 insertions(+) create mode 100644 dref/migrations/0075_auto_20240301_0453.py diff --git a/dref/migrations/0075_auto_20240301_0453.py b/dref/migrations/0075_auto_20240301_0453.py new file mode 100644 index 0000000000..1ce1d7c3d3 --- /dev/null +++ b/dref/migrations/0075_auto_20240301_0453.py @@ -0,0 +1,173 @@ +# Generated by Django 3.2.23 on 2024-03-01 04:53 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dref', '0074_auto_20240129_0909'), + ] + + operations = [ + migrations.AddField( + model_name='dref', + name='any_other_actor', + field=models.TextField(blank=True, help_text='Has any other actor in the country activated an early action protocol?', null=True, verbose_name='Actor in country activated early action protocol?'), + ), + migrations.AddField( + model_name='dref', + name='ifrc_anticipatory_email', + field=models.CharField(blank=True, max_length=255, null=True, verbose_name='ifrc focal point for anticipatory email'), + ), + migrations.AddField( + model_name='dref', + name='ifrc_anticipatory_name', + field=models.CharField(blank=True, max_length=255, null=True, verbose_name='ifrc focal point for anticipatory name'), + ), + migrations.AddField( + model_name='dref', + name='ifrc_anticipatory_phone_number', + field=models.CharField(blank=True, max_length=100, null=True, verbose_name='ifrc focal point for anticipatory phone number'), + ), + migrations.AddField( + model_name='dref', + name='ifrc_anticipatory_title', + field=models.CharField(blank=True, max_length=255, null=True, verbose_name='ifrc focal point for anticipatory title'), + ), + migrations.AddField( + model_name='dref', + name='immediate_boys', + field=models.IntegerField(blank=True, help_text='Boys under 18', null=True, verbose_name='boys'), + ), + migrations.AddField( + model_name='dref', + name='immediate_disability_people_per', + field=models.FloatField(blank=True, help_text='Estimated % people disability for immediate response', null=True, verbose_name='disability people for immediate response'), + ), + migrations.AddField( + model_name='dref', + name='immediate_displaced_people', + field=models.IntegerField(blank=True, help_text='Estimated number of displaced people for immediate response', null=True, verbose_name='displaced people for immediate response'), + ), + migrations.AddField( + model_name='dref', + name='immediate_girls', + field=models.IntegerField(blank=True, help_text='Girls under 18', null=True, verbose_name='girls'), + ), + migrations.AddField( + model_name='dref', + name='immediate_men', + field=models.IntegerField(blank=True, null=True, verbose_name='men'), + ), + migrations.AddField( + model_name='dref', + name='immediate_people_per_local', + field=models.FloatField(blank=True, help_text='Estimated % people Rural for immediate response', null=True, verbose_name='people per local for immediate response'), + ), + migrations.AddField( + model_name='dref', + name='immediate_people_per_urban', + field=models.FloatField(blank=True, help_text='Estimated % people Urban for immediate response', null=True, verbose_name='people per urban for immediate response'), + ), + migrations.AddField( + model_name='dref', + name='immediate_total_targeted_population', + field=models.IntegerField(blank=True, help_text='Estimated number of targeted people', null=True, verbose_name='total targeted population for immediate response'), + ), + migrations.AddField( + model_name='dref', + name='immediate_women', + field=models.IntegerField(blank=True, null=True, verbose_name='women'), + ), + migrations.AddField( + model_name='dref', + name='lead_time_for_early_action', + field=models.TextField(blank=True, null=True, verbose_name='lead time for early action'), + ), + migrations.AddField( + model_name='dref', + name='ns_disaster_risk_reduction', + field=models.TextField(blank=True, help_text='Has the National Society implemented relevant Disaster Risk Reduction activities in the same geographical area that this plan builds upon?', null=True, verbose_name='Has the National Society implemented disaster Risk Reduction activities?'), + ), + migrations.AddField( + model_name='dref', + name='ns_eaps', + field=models.TextField(blank=True, help_text='Does the National Society have EAPs or simplified EAPs active, triggered or under development?', null=True, verbose_name='Does the NS have EAPS?'), + ), + migrations.AddField( + model_name='dref', + name='ns_mandate', + field=models.TextField(blank=True, help_text='Does the National Society have the mandate to act before the impact of the hazard?', null=True, verbose_name='Does the NS have the mandate?'), + ), + migrations.AddField( + model_name='dref', + name='ns_mitigating_measures', + field=models.TextField(blank=True, help_text='Is the National Society implementing other mitigating measures through other sources of funds', null=True, verbose_name='Does the NS have mitigating measures?'), + ), + migrations.AddField( + model_name='dref', + 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', + field=models.TextField(blank=True, help_text='For the expected impacted population if the hazard materialises for the immediate response activities', null=True, verbose_name='selection criteria for expected impacted population'), + ), + migrations.AddField( + model_name='dref', + 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', + field=models.TextField(blank=True, null=True, verbose_name='expected need'), + ), + migrations.AddField( + model_name='plannedintervention', + name='early_action_block', + field=models.TextField(blank=True, null=True, verbose_name='early action block'), + ), + migrations.AddField( + model_name='plannedintervention', + name='early_response_block', + field=models.TextField(blank=True, null=True, verbose_name='early response block'), + ), + migrations.AddField( + model_name='plannedintervention', + name='people_targeted_by_early_action', + field=models.IntegerField(blank=True, null=True, verbose_name='people targeted by early action'), + ), + migrations.AddField( + model_name='plannedintervention', + name='people_targeted_by_immediate_response', + field=models.IntegerField(blank=True, null=True, verbose_name='people targeted by immediate response'), + ), + migrations.AddField( + model_name='plannedintervention', + name='readiness_block', + field=models.TextField(blank=True, null=True, verbose_name='readiness block'), + ), + ] diff --git a/dref/models.py b/dref/models.py index cdfd24de2b..4e8335e876 100644 --- a/dref/models.py +++ b/dref/models.py @@ -94,6 +94,8 @@ 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) + expected_need = models.TextField(verbose_name=_("expected need"), blank=True, null=True) class Meta: verbose_name = _("identified need") @@ -154,6 +156,9 @@ 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) + readiness_block = models.TextField(verbose_name=_("readiness block"), blank=True, null=True) + early_action_block = models.TextField(verbose_name=_("early action block"), blank=True, null=True) + early_response_block = models.TextField(verbose_name=_("early response block"), blank=True, null=True) people_targeted_by_early_action = models.IntegerField( verbose_name=_("people targeted by early action"), null=True, @@ -365,9 +370,32 @@ 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, + ) + targeting_expected_impacted_population = models.TextField( + verbose_name=_("targeting expected impacted population"), + blank=True, + null=True, + help_text=_("Targeting of the expected impacted population if the disaster materialises for the immediate response activities."), + ) 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_expected_impacted_population = models.TextField( + verbose_name=_("selection criteria for expected impacted population"), + blank=True, + null=True, + help_text=_("For the expected impacted population if the hazard materialises for the immediate response activities") + ) entity_affected = models.TextField( verbose_name=_("entity affected"), blank=True, @@ -380,6 +408,7 @@ class Status(models.IntegerChoices): null=True, help_text=_("Community been involved in the analysis of the process"), ) + # @Note: Early action activities starts from here women = models.IntegerField(verbose_name=_("women"), blank=True, null=True) men = models.IntegerField(verbose_name=_("men"), blank=True, null=True) girls = models.IntegerField(verbose_name=_("girls"), help_text=_("Girls under 18"), blank=True, null=True) @@ -417,6 +446,40 @@ class Status(models.IntegerChoices): displaced_people = models.IntegerField( verbose_name=_("displaced people"), help_text=_("Estimated number of displaced people"), blank=True, null=True ) + #Early action activities ends here + # @Note: Immediate response activities starts from here + immediate_women = models.IntegerField(verbose_name=_("women"), blank=True, null=True) + immediate_men = models.IntegerField(verbose_name=_("men"), blank=True, null=True) + immediate_girls = models.IntegerField(verbose_name=_("girls"), help_text=_("Girls under 18"), blank=True, null=True) + immediate_boys = models.IntegerField(verbose_name=_("boys"), help_text=_("Boys under 18"), blank=True, null=True) + immediate_total_targeted_population = models.IntegerField( + verbose_name=_("total targeted population for immediate response"), + help_text=_("Estimated number of targeted people"), + blank=True, + null=True, + ) + immediate_disability_people_per = models.FloatField( + verbose_name=_("disability people for immediate response"), + help_text=_("Estimated % people disability for immediate response"), + blank=True, + null=True, + ) + immediate_people_per_urban = models.FloatField( + verbose_name=_("people per urban for immediate response"), + help_text=_("Estimated % people Urban for immediate response"), + blank=True, + null=True, + ) + immediate_people_per_local = models.FloatField( + verbose_name=_("people per local for immediate response"), + help_text=_("Estimated % people Rural for immediate response"), + blank=True, + null=True, + ) + immediate_displaced_people = models.IntegerField( + verbose_name=_("displaced people for immediate response"), help_text=_("Estimated number of displaced people for immediate response"), blank=True, null=True + ) + #Immediate response activities ends here operation_objective = models.TextField( verbose_name=_("operation objective"), help_text=_("Overall objective of the operation"),