mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 11:27:09 +00:00
[FEAT] Update database migrations to be more generic and applicable
This commit is contained in:
@@ -195,7 +195,7 @@ class PersonAnswerSetForm(forms.ModelForm, DynamicAnswerSetBase):
|
|||||||
'project_started_date':
|
'project_started_date':
|
||||||
f'Date started on the {config.PARENT_PROJECT_NAME} project',
|
f'Date started on the {config.PARENT_PROJECT_NAME} project',
|
||||||
'external_organisations':
|
'external_organisations':
|
||||||
'Please list the main organisations external to BRECcIA work that you have been working with since 1st January 2019 that are involved in food/water security in African dryland regions'
|
'Which external organisations do you work with that are involved in a related field/industry?'
|
||||||
}
|
}
|
||||||
help_texts = {
|
help_texts = {
|
||||||
'organisation_started_date':
|
'organisation_started_date':
|
||||||
|
|||||||
@@ -18,6 +18,6 @@ class Migration(migrations.Migration):
|
|||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='person',
|
model_name='person',
|
||||||
name='gender',
|
name='gender',
|
||||||
field=models.CharField(blank=True, choices=[('M', 'Male'), ('F', 'Female'), ('O', 'Other'), ('N', 'Prefer not to say')], max_length=1),
|
field=models.CharField(blank=True, choices=[('M', 'Male'), ('F', 'Female'), ('B', 'Non-binary'), ('O', 'Other'), ('N', 'Prefer not to say')], max_length=1),
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ from .utils.question_sets import port_question
|
|||||||
class GenderChoices(TextChoices):
|
class GenderChoices(TextChoices):
|
||||||
MALE = 'M', 'Male'
|
MALE = 'M', 'Male'
|
||||||
FEMALE = 'F', 'Female'
|
FEMALE = 'F', 'Female'
|
||||||
|
NON_BINARY = 'B', 'Non-binary'
|
||||||
OTHER = 'O', 'Other'
|
OTHER = 'O', 'Other'
|
||||||
PREFER_NOT_TO_SAY = 'N', 'Prefer not to say'
|
PREFER_NOT_TO_SAY = 'N', 'Prefer not to say'
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ def forward_organisations(apps, schema_editor):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
question = PersonQuestion.objects.filter(
|
question = PersonQuestion.objects.filter(
|
||||||
text='Please list the main organisations external to BRECcIA work that you have been working with since 1st January 2019 that are involved in food/water security in African dryland regions'
|
text='Which external organisations do you work with that are involved in a related field/industry?'
|
||||||
).latest('version')
|
).latest('version')
|
||||||
|
|
||||||
PersonAnswerSet = apps.get_model('people', 'PersonAnswerSet')
|
PersonAnswerSet = apps.get_model('people', 'PersonAnswerSet')
|
||||||
|
|||||||
Reference in New Issue
Block a user