Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix choices #54

Merged
merged 1 commit into from
Mar 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions src/country_workspace/versioning/hope_fields.py
Original file line number Diff line number Diff line change
@@ -25,6 +25,49 @@ def create_hope_field_definitions() -> None:
field_type=forms.ChoiceField,
attrs={"choices": [["not disabled", "not disabled"], ["disabled", "disabled"]]},
)
FieldDefinition.objects.get_or_create(
name="HOPE HH ResidenceStatus",
slug=slugify("HOPE HH ResidenceStatus"),
field_type=forms.ChoiceField,
attrs={
"choices": [
["", ""],
["IDP", "Displaced | Internally Displaced People"],
["REFUGEE", "Displaced | Refugee / Asylum Seeker"],
["OTHERS_OF_CONCERN", "Displaced | Others of Concern"],
["HOST", "Non-displaced | Host"],
["NON_HOST", "Non-displaced | Non-host"],
["RETURNEE", "Displaced | Returnee"],
]
},
)
FieldDefinition.objects.get_or_create(
name="HOPE IND Relationship",
slug=slugify("HOPE IND Relationship"),
field_type=forms.ChoiceField,
attrs={
"choices": [
["RELATIONSHIP_UNKNOWN", "Unknown"],
["AUNT_UNCLE", "Aunt / Uncle"],
["BROTHER_SISTER", "Brother / Sister"],
["COUSIN", "Cousin"],
["DAUGHTERINLAW_SONINLAW", "Daughter-in-law / Son-in-law"],
["GRANDDAUGHTER_GRANDSON", "Granddaughter / Grandson"],
["GRANDMOTHER_GRANDFATHER", "Grandmother / Grandfather"],
["HEAD", "Head of household (self)"],
["MOTHER_FATHER", "Mother / Father"],
["MOTHERINLAW_FATHERINLAW", "Mother-in-law / Father-in-law"],
["NEPHEW_NIECE", "Nephew / Niece"],
["NON_BENEFICIARY", "Not a Family Member. Can only act as a recipient."],
["RELATIONSHIP_OTHER", "Other"],
["SISTERINLAW_BROTHERINLAW", "Sister-in-law / Brother-in-law"],
["SON_DAUGHTER", "Son / Daughter"],
["WIFE_HUSBAND", "Wife / Husband"],
["FOSTER_CHILD", "Foster child"],
["FREE_UNION", "Free union"],
]
},
)

SyncLog.objects.create_lookups()