From bc3b065a948aa5b023cdc8056eb68ccedc7849f2 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson <frjo@xdeb.org> Date: Wed, 29 Aug 2018 19:17:15 +0200 Subject: [PATCH] Correcting uuids, fixing non existing email, correcting comments and recommendation type names, need to be lower case. --- .../migrate_community_lab_applications.py | 54 +++++++------- .../management/commands/migration_base.py | 6 ++ .../seed_community_lab_application.py | 72 ++++++++++--------- .../management/commands/seed_concept_note.py | 8 +-- .../management/commands/seed_fellowship.py | 8 +-- .../commands/seed_rapid_response.py | 4 +- 6 files changed, 82 insertions(+), 70 deletions(-) diff --git a/opentech/apply/funds/management/commands/migrate_community_lab_applications.py b/opentech/apply/funds/management/commands/migrate_community_lab_applications.py index 7f09ce9e6..2b8d56bb9 100644 --- a/opentech/apply/funds/management/commands/migrate_community_lab_applications.py +++ b/opentech/apply/funds/management/commands/migrate_community_lab_applications.py @@ -23,7 +23,7 @@ class Command(MigrateCommand): "key": "email", }, "field_application_event_date": { - "id": "8c74af9c-6cc7-4558-9d72-0f2c9a87f22b", + "id": "d3364b5b-976b-4cd6-85d5-4ccc0bb9b560", "type": "value", "key": "value", }, @@ -31,96 +31,100 @@ class Command(MigrateCommand): "id": "value", "type": "value", }, + "field_application_amount_text": { + "id": "value", + "type": "value", + }, "field_application_describe": { - "id": "fe488e12-b5f4-491a-9ca9-d7aff0993884", + "id": "aeea7bd9-01b5-406e-bb30-1303ba0f550a", "type": "value", "key": "safe_value", }, "field_application_who": { - "id": "e7a0bc56-ad5d-4be7-9709-eb823a0e6e3d", + "id": "a5117396-0286-4937-91a3-be33a5944ac6", "type": "value", "key": "safe_value", }, "field_application_objective_text": { - "id": "43d52051-27f2-4d30-abf1-173a31f15072", + "id": "d90d2cd4-831e-46f5-8f2e-82ac94913784", "type": "value", "key": "safe_value", }, "field_application_strategy": { - "id": "4e1f46ad-12d7-40c3-a1e8-0793bb327961", + "id": "fc5ddac7-c7b5-4d07-9bc3-16902e9a7afb", "type": "value", "key": "safe_value", }, "field_application_how": { - "id": "e33e1415-6832-4ef3-8a10-ae6d3aef61c8", + "id": "ea6ceb76-882e-4739-94da-7b055a112d1c", "type": "value", "key": "safe_value", }, "field_application_collaboration": { - "id": "812792a3-edc5-4521-b5c7-e9c697122325", + "id": "afa7e16b-d31c-4016-af88-7939acc7b6e1", "type": "value", "key": "safe_value", }, "field_application_diverse": { - "id": "c367cae6-9fde-40fc-8c99-7ca2117bda6a", + "id": "55e23c45-72a7-4ab9-9940-764d00724de8", "type": "value", "key": "safe_value", }, "field_application_outreach": { - "id": "14ef1b53-ef85-4756-a13e-19d3c3be7d85", + "id": "737bd894-78b1-41ef-969c-2a57c843cd5b", "type": "value", "key": "safe_value", }, "field_application_needs": { - "id": "eb6474e1-2f69-4f69-9a9c-edf13c25455c", + "id": "56c84f40-f59e-4e82-80a1-2cd971717e9c", "type": "value", "key": "safe_value", }, "field_application_budget": { - "id": "de631da99f904f5f9c67e3a6e182f7c6", + "id": "6ca29ae0-780a-467a-a3e9-34195bcb0d79", "type": "value", "key": "safe_value", }, "field_application_cod": { - "id": "4948cc0fd1d142eeb81dd10784fba0f2", + "id": "9db8b2ca-62b6-44c4-9d3d-70cb4a28e65f", "type": "boolean", }, + "field_concept_upload": { + "id": "b3af7aac-3439-45fa-9573-518f82f5cd6c", + "type": "file", + # TODO: finish mapping + }, "field_application_otf_mission": { - "id": "9b20aa6384d54f64b1fb846efed89a41", + "id": "1248f597-2f18-4b16-8f96-63912e5197c5", "type": "boolean", }, "field_application_otf_tos": { - "id": "b4a2f762f61c402aa8d22b58b3201263", + "id": "5a676552-e189-417e-9901-05bfc973cfb5", "type": "boolean", }, "field_application_otf_represent": { - "id": "9409408f0cee4c97ac0517838eacdd9f", + "id": "c4f54c3d-6b2a-4b32-b651-9121430aa06f", "type": "boolean", }, "field_application_otf_license": { - "id": "e0e6990db8744781afe9d42a105b8ff4", + "id": "beb4d454-466d-43d5-823e-80dbccacbbb3", "type": "boolean", }, "field_application_otf_complete": { - "id": "966cd67f04a34c16b4e5892d4cd1e175", + "id": "fd6b034d-7cec-49fe-b4da-991c382283ef", "type": "boolean", }, "field_application_otf_deadline": { - "id": "d5b982f829dd4ee4aab3eb5349e6b077", + "id": "d930a864-263d-4d0d-8ff1-553b13efda41", "type": "boolean", }, "field_application_otf_list": { - "id": "4a4feb4e6e5445bd83b42e9f39ca833c", + "id": "f75fd335-be7d-460d-b96a-53d7aa9a826f", "type": "boolean", }, "field_application_otf_newsletter": { - "id": "e011bd48613648d48263997f71656bfc", + "id": "a1f03bca-9267-49cf-9880-444d6806065c", "type": "boolean", }, - "field_concept_upload": { - "id": "8c4f9cf13d624b64ab70e6cd342921f5", - "type": "file", - # TODO: finish mapping - }, } diff --git a/opentech/apply/funds/management/commands/migration_base.py b/opentech/apply/funds/management/commands/migration_base.py index ba0708c6b..4677175dd 100644 --- a/opentech/apply/funds/management/commands/migration_base.py +++ b/opentech/apply/funds/management/commands/migration_base.py @@ -103,6 +103,12 @@ class MigrateCommand(BaseCommand): if "duration" not in form_data or not form_data["duration"]: form_data["duration"] = "1" + if "email" not in form_data or not form_data["email"]: + if hasattr(submission.user, 'email'): + form_data["email"] = submission.user.email + else: + form_data["email"] = f"user+{node['uid']}@exeample.com" + submission.form_data = form_data try: diff --git a/opentech/apply/funds/management/commands/seed_community_lab_application.py b/opentech/apply/funds/management/commands/seed_community_lab_application.py index c2483f49c..e2b2fdebc 100644 --- a/opentech/apply/funds/management/commands/seed_community_lab_application.py +++ b/opentech/apply/funds/management/commands/seed_community_lab_application.py @@ -24,38 +24,38 @@ class Command(BaseCommand): def create_community_lab_form(self): data = [ - {"type": "text_markup", "value": "<h3>Basic information</h3>", "id": "33d38e10-43e3-4a61-8a10-2d3ad760861b"}, - {"type": "title", "value": {"field_label": "What is your project name?", "help_text": "", "info": None}, "id": "4507372e-a284-488a-ac3c-53b689849d67"}, - {"type": "full_name", "value": {"field_label": "Your name", "help_text": "", "info": None}, "id": "b62f1c35-52c7-44b5-b7cd-2f1aac6701bd"}, - {"type": "email", "value": {"field_label": "E-mail", "help_text": "", "info": None}, "id": "02a6cd0e-7ff6-46cd-9bdb-bf5858fe2514"}, - {"type": "date", "value": {"field_label": "Date of event", "help_text": "", "required": "", "default_value": ""}, "id": "8c74af9c-6cc7-4558-9d72-0f2c9a87f22b"}, - {"type": "value", "value": {"field_label": "Amount requested", "help_text": "", "info": None}, "id": "dfa76e03-0148-421b-a0fb-67f6fa1edee0"}, - {"type": "duration", "value": {"field_label": "Duration", "help_text": "", "info": None}, "id": "c61fbc9a-6da9-4293-9e21-3e20724bd36c"}, - {"type": "text_markup", "value": "<h3>More information about your product</h3>", "id": "d2090b37-11e0-4282-8f98-5edfb05918c0"}, - {"type": "rich_text", "value": {"field_label": "Please provide us a description of this event", "help_text": "", "required": "", "default_value": ""}, "id": "fe488e12-b5f4-491a-9ca9-d7aff0993884"}, - {"type": "rich_text", "value": {"field_label": "Please describe the target audience(s)", "help_text": "", "required": "", "default_value": ""}, "id": "e7a0bc56-ad5d-4be7-9709-eb823a0e6e3d"}, - {"type": "rich_text", "value": {"field_label": "What are the event’s objectives?", "help_text": "", "required": "", "default_value": ""}, "id": "43d52051-27f2-4d30-abf1-173a31f15072"}, - {"type": "rich_text", "value": {"field_label": "Please describe the strategy that will allow you to achieve your goals", "help_text": "", "required": "", "default_value": ""}, "id": "4e1f46ad-12d7-40c3-a1e8-0793bb327961"}, - {"type": "rich_text", "value": {"field_label": "How will this event support people living within a developing country affected by repressive censorship and/or surveillance?", "help_text": "", "required": "", "default_value": ""}, "id": "e33e1415-6832-4ef3-8a10-ae6d3aef61c8"}, - {"type": "rich_text", "value": {"field_label": "What collaborations with other organizations, communities, or networks exist around this event, if any?", "help_text": "", "required": "", "default_value": ""}, "id": "812792a3-edc5-4521-b5c7-e9c697122325"}, - {"type": "rich_text", "value": {"field_label": "How will the event ensure new and diverse voices are being represented?", "help_text": "", "required": "", "default_value": ""}, "id": "c367cae6-9fde-40fc-8c99-7ca2117bda6a"}, - {"type": "rich_text", "value": {"field_label": "Please describe the outreach and promotion plan for the event?", "help_text": "", "required": "", "default_value": ""}, "id": "14ef1b53-ef85-4756-a13e-19d3c3be7d85"}, - {"type": "rich_text", "value": {"field_label": "Is there anything you need help with in regards to planning this event that is non-monetary related?", "help_text": "For example, are there any audiences you are trying to cultivate? Do you need advice on the format of the event?", "required": "", "default_value": ""}, "id": "eb6474e1-2f69-4f69-9a9c-edf13c25455c"}, - {"type": "rich_text", "value": {"field_label": "Please provide a detailed budget", "help_text": "", "required": "", "default_value": ""}, "id": "de631da99f904f5f9c67e3a6e182f7c6"}, - {"type": "checkbox", "value": {"field_label": "Do you have a code of conduct?", "help_text": "If yes, upload it in the field below.", "required": "true", "default_value": "false"}, "id": "4948cc0fd1d142eeb81dd10784fba0f2"}, - {"type": "multi_file", "value": {"field_label": "Upload", "help_text": "", "required": ""}, "id": "8c4f9cf13d624b64ab70e6cd342921f5"}, - {"type": "text_markup", "value": "<h3>I acknowledge</h3>", "id": "2c514f5844ae496085717dd48030d380"}, - {"type": "checkbox", "value": {"field_label": "My application will be dismissed if it does not fit within OTF\'s mission, values, principles statements.", "help_text": "", "required": "true", "default_value": ""}, "id": "9b20aa6384d54f64b1fb846efed89a41"}, - {"type": "text_markup", "value": "Read our <a href=\"\/about/program\">mission, values, and principles</a>.", "id": "cc52fb3e390647aa90024346af4dac3a"}, - {"type": "checkbox", "value": {"field_label": "I have read and understand OTF\'s Terms and Privacy policy.", "help_text": "", "required": "true", "default_value": ""}, "id": "b4a2f762f61c402aa8d22b58b3201263"}, - {"type": "text_markup", "value": "Read the <a href=\"\/tos\">Terms and Privacy policy</a>.", "id": "470782b4caf34cf89c9571eb16ae48cb"}, - {"type": "checkbox", "value": {"field_label": "I am legally able to sign contracts or represent an organization that can.", "help_text": "", "required": "true", "default_value": ""}, "id": "9409408f0cee4c97ac0517838eacdd9f"}, - {"type": "checkbox", "value": {"field_label": "I understand that all intellectual property created with support for this application must be openly licensed.", "help_text": "", "required": "true", "default_value": ""}, "id": "e0e6990db8744781afe9d42a105b8ff4"}, - {"type": "checkbox", "value": {"field_label": "I understand that if my application is incomplete in any way, it will be dismissed.", "help_text": "", "required": "true", "default_value": ""}, "id": "966cd67f04a34c16b4e5892d4cd1e175"}, - {"type": "checkbox", "value": {"field_label": "I understand that if my application is after a deadline, it will not be reviewed until after the next deadline.", "help_text": "", "required": "true", "default_value": ""}, "id": "d5b982f829dd4ee4aab3eb5349e6b077"}, - {"type": "text_markup", "value": "<h3>I would like to</h3>", "id": "2d813012ca1b44f6b42d560c1b475ff0"}, - {"type": "checkbox", "value": {"field_label": "Sign up to the OTF-Announce list, low traffic (funding opportunities, major alerts, etc)", "help_text": "", "required": "true", "default_value": ""}, "id": "4a4feb4e6e5445bd83b42e9f39ca833c"}, - {"type": "checkbox", "value": {"field_label": "Sign up for OTF\'s daily newsletter (collection of news related to global internet freedom).", "help_text": "", "required": "true", "default_value": ""}, "id": "e011bd48613648d48263997f71656bfc"} + {"type": "text_markup", "value": "<h3>Basic information</h3>", "id": "353df1fa-a054-406f-855f-842a52ad2852"}, + {"type": "title", "value": {"field_label": "What is your event name?", "help_text": "", "info": None}, "id": "690e7839-eedb-4c24-a438-91d09da88774"}, + {"type": "full_name", "value": {"field_label": "Your name", "help_text": "", "info": None}, "id": "4926d94b-7e57-494a-a2e2-2331a8ee04a2"}, + {"type": "email", "value": {"field_label": "E-mail", "help_text": "", "info": None}, "id": "f0b90755-dc11-4de7-89aa-7611bf698455"}, + {"type": "date", "value": {"field_label": "Date of event", "help_text": "", "required": "", "default_value": ""}, "id": "d3364b5b-976b-4cd6-85d5-4ccc0bb9b560"}, + {"type": "value", "value": {"field_label": "Amount requested", "help_text": "", "info": None}, "id": "eadbd266-c825-45ea-8de9-deaa2aaa677b"}, + {"type": "duration", "value": {"field_label": "Duration", "help_text": "", "info": None}, "id": "9af05779-8547-4a85-8f1c-3505d5778e94"}, + {"type": "text_markup", "value": "<h3>More information about your product</h3>", "id": "17bc7cbe-49d7-42cf-8f60-1bbb0c841a1a"}, + {"type": "rich_text", "value": {"field_label": "Please provide us a description of this event", "help_text": "", "required": "", "default_value": ""}, "id": "aeea7bd9-01b5-406e-bb30-1303ba0f550a"}, + {"type": "rich_text", "value": {"field_label": "Please describe the target audience(s)", "help_text": "", "required": "", "default_value": ""}, "id": "a5117396-0286-4937-91a3-be33a5944ac6"}, + {"type": "rich_text", "value": {"field_label": "What are the event’s objectives?", "help_text": "", "required": "", "default_value": ""}, "id": "d90d2cd4-831e-46f5-8f2e-82ac94913784"}, + {"type": "rich_text", "value": {"field_label": "Please describe the strategy that will allow you to achieve your goals", "help_text": "", "required": "", "default_value": ""}, "id": "fc5ddac7-c7b5-4d07-9bc3-16902e9a7afb"}, + {"type": "rich_text", "value": {"field_label": "How will this event support people living within a developing country affected by repressive censorship and/or surveillance?", "help_text": "", "required": "", "default_value": ""}, "id": "ea6ceb76-882e-4739-94da-7b055a112d1c"}, + {"type": "rich_text", "value": {"field_label": "What collaborations with other organizations, communities, or networks exist around this event, if any?", "help_text": "", "required": "", "default_value": ""}, "id": "afa7e16b-d31c-4016-af88-7939acc7b6e1"}, + {"type": "rich_text", "value": {"field_label": "How will the event ensure new and diverse voices are being represented?", "help_text": "", "required": "", "default_value": ""}, "id": "55e23c45-72a7-4ab9-9940-764d00724de8"}, + {"type": "rich_text", "value": {"field_label": "Please describe the outreach and promotion plan for the event?", "help_text": "", "required": "", "default_value": ""}, "id": "737bd894-78b1-41ef-969c-2a57c843cd5b"}, + {"type": "rich_text", "value": {"field_label": "Is there anything you need help with in regards to planning this event that is non-monetary related?", "help_text": "For example, are there any audiences you are trying to cultivate? Do you need advice on the format of the event?", "required": "", "default_value": ""}, "id": "56c84f40-f59e-4e82-80a1-2cd971717e9c"}, + {"type": "rich_text", "value": {"field_label": "Please provide a detailed budget", "help_text": "", "required": "", "default_value": ""}, "id": "6ca29ae0-780a-467a-a3e9-34195bcb0d79"}, + {"type": "checkbox", "value": {"field_label": "Do you have a code of conduct?", "help_text": "If yes, upload it in the field below.", "required": "true", "default_value": "false"}, "id": "9db8b2ca-62b6-44c4-9d3d-70cb4a28e65f"}, + {"type": "multi_file", "value": {"field_label": "Upload", "help_text": "", "required": ""}, "id": "b3af7aac-3439-45fa-9573-518f82f5cd6c"}, + {"type": "text_markup", "value": "<h3>I acknowledge</h3>", "id": "b4bbe32a-058d-44b0-aaea-bddc70674277"}, + {"type": "checkbox", "value": {"field_label": "My application will be dismissed if it does not fit within OTF\'s mission, values, principles statements.", "help_text": "", "default_value": ""}, "id": "1248f597-2f18-4b16-8f96-63912e5197c5"}, + {"type": "text_markup", "value": "Read our <a href=\"\/about/program\">mission, values, and principles</a>.", "id": "67b65f65-5d9f-4152-9c0b-d980d9944e3d"}, + {"type": "checkbox", "value": {"field_label": "I have read and understand OTF\'s Terms and Privacy policy.", "help_text": "", "default_value": ""}, "id": "5a676552-e189-417e-9901-05bfc973cfb5"}, + {"type": "text_markup", "value": "Read the <a href=\"\/tos\">Terms and Privacy policy</a>.", "id": "f340a29d-56e3-4a01-be37-fc405cbafa8e"}, + {"type": "checkbox", "value": {"field_label": "I am legally able to sign contracts or represent an organization that can.", "help_text": "", "default_value": ""}, "id": "c4f54c3d-6b2a-4b32-b651-9121430aa06f"}, + {"type": "checkbox", "value": {"field_label": "I understand that all intellectual property created with support for this application must be openly licensed.", "help_text": "", "default_value": ""}, "id": "beb4d454-466d-43d5-823e-80dbccacbbb3"}, + {"type": "checkbox", "value": {"field_label": "I understand that if my application is incomplete in any way, it will be dismissed.", "help_text": "", "default_value": ""}, "id": "fd6b034d-7cec-49fe-b4da-991c382283ef"}, + {"type": "checkbox", "value": {"field_label": "I understand that if my application is after a deadline, it will not be reviewed until after the next deadline.", "help_text": "", "default_value": ""}, "id": "d930a864-263d-4d0d-8ff1-553b13efda41"}, + {"type": "text_markup", "value": "<h3>I would like to</h3>", "id": "2b572f43-c912-4a94-93ae-cd6b64c2b95b"}, + {"type": "checkbox", "value": {"field_label": "Sign up to the OTF-Announce list, low traffic (funding opportunities, major alerts, etc).", "help_text": "", "default_value": ""}, "id": "f75fd335-be7d-460d-b96a-53d7aa9a826f"}, + {"type": "checkbox", "value": {"field_label": "Sign up for OTF\'s daily newsletter (collection of news related to global internet freedom).", "help_text": "", "default_value": ""}, "id": "a1f03bca-9267-49cf-9880-444d6806065c"} ] application_form, _ = ApplicationForm.objects.get_or_create(name='Community lab', defaults={'form_fields': json.dumps(data)}) @@ -66,15 +66,17 @@ class Command(BaseCommand): data2 = [ {"type": "text_markup", "value": "<h3>Conflicts of Interest and Confidentialit</h3>", "id": "fe01dccb-87db-4dba-8cb8-f75e6f3448e6"}, - {"type": "rich_text", "value": {"field_label": "Conflict(s) of interest disclosure", "help_text": "", "required": "", "default_value": ""}, "id": "f3c42cf1-e5ef-4674-bf6c-8e4640ee0d58"}, - {"type": "Recommendation", "value": {"field_label": "Do you think we should support this request?", "help_text": "", "info": None}, "id": "caa6d522-4cfc-4f96-a29b-773a2de03e31"}, + {"type": "checkbox", "value": {"field_label": "I understand about confidentiality", "help_text": "", "required": "true", "default_value": ""}, "id": "c1c6cedc-a084-4c55-87d5-7f6baf48441e"}, + {"type": "dropdown", "value": {"field_label": "Do you have any conflicts of interest to report?", "help_text": "", "required": "", "choices": ["Yes", "No"]}, "id": "c29a7f43-009c-4341-bbe8-9582ba089d52"}, + {"type": "rich_text", "value": {"field_label": "Conflict(s) of interest disclosure", "help_text": "", "required": "", "default_value": ""}, "id": "3aab69b1-6b60-4850-8f9f-7bc1b5871dcf"}, + {"type": "recommendation", "value": {"field_label": "Do you think we should support this request?", "help_text": "", "info": None}, "id": "caa6d522-4cfc-4f96-a29b-773a2de03e31"}, {"type": "score", "value": {"field_label": "How well do the goals and objectives fit OTF’s remit?", "help_text": "", "required": ""}, "id": "732fc004-3086-44e1-8508-e0f17c3732a8"}, {"type": "rich_text", "value": {"field_label": "What do you like about the proposed effort?", "help_text": "", "required": "", "default_value": ""}, "id": "f3c42cf1-e5ef-4674-bf6c-8e4640ee0d58"}, {"type": "rich_text", "value": {"field_label": "What do you not like about the proposed effort?", "help_text": "", "required": "", "default_value": ""}, "id": "e1e69628-c663-4cd2-a0ea-507ad01149de"}, {"type": "rich_text", "value": {"field_label": "What areas, if any, would you like more information?", "help_text": "", "required": "", "default_value": ""}, "id": "3033f228-58af-4944-b884-736fe6258bd6"}, {"type": "rich_text", "value": {"field_label": "How could they can improve collaboration or the inclusion of diverse voices?", "help_text": "", "required": "", "default_value": ""}, "id": "20ec1ed7-4e3e-433c-944a-7c20cd6245c8"}, {"type": "rich_text", "value": {"field_label": "Are there any individuals, communities, or networks they should reach out to?", "help_text": "", "required": "", "default_value": ""}, "id": "fd361c53-a263-4572-8403-74f6736d38fc"}, - {"type": "Comments", "value": {"field_label": "Other comments", "help_text": "", "info": None}, "id": "d74e398e-6e64-43ae-b799-a3b79860c80e"} + {"type": "comments", "value": {"field_label": "Other comments", "help_text": "", "info": None}, "id": "d74e398e-6e64-43ae-b799-a3b79860c80e"} ] community_lab_review_form, _ = ReviewForm.objects.get_or_create(name='Community lab review', defaults={'form_fields': json.dumps(data2)}) diff --git a/opentech/apply/funds/management/commands/seed_concept_note.py b/opentech/apply/funds/management/commands/seed_concept_note.py index 3e0c01f2c..f203dec44 100644 --- a/opentech/apply/funds/management/commands/seed_concept_note.py +++ b/opentech/apply/funds/management/commands/seed_concept_note.py @@ -154,12 +154,12 @@ class Command(BaseCommand): data3 = [ {"type": "text_markup", "value": "<h3>Conflicts of Interest and Confidentialit</h3>", "id": "4dc49d2f-a886-4244-b347-3614f8d1e399"}, {"type": "rich_text", "value": {"field_label": "Conflict(s) of interest disclosure", "help_text": "", "required": "", "default_value": ""}, "id": "f16be0b3-ef02-4876-b056-8a84238b1a52"}, - {"type": "Recommendation", "value": {"field_label": "Do you think we should support this request?", "help_text": "", "info": None}, "id": "25d0d9b0-6e65-4fe3-906a-a1cd211def96"}, + {"type": "recommendation", "value": {"field_label": "Do you think we should support this request?", "help_text": "", "info": None}, "id": "25d0d9b0-6e65-4fe3-906a-a1cd211def96"}, {"type": "score", "value": {"field_label": "Goals and principles", "help_text": "", "required": ""}, "id": "6dd8d5d2-09a5-4681-aebc-eb9ccd00395a"}, {"type": "score", "value": {"field_label": "Technical merit", "help_text": "", "required": ""}, "id": "52b1f53c-9656-4b0c-8b8b-a9c57869356d"}, {"type": "score", "value": {"field_label": "Reasonable and realistic", "help_text": "", "required": ""}, "id": "aedb27e7-6044-4e04-b2c7-358065c8fe5c"}, {"type": "rich_text", "value": {"field_label": "Request specific questions", "help_text": "", "required": "", "default_value": ""}, "id": "84405ba2-f94e-4d4d-92e1-190bd802f858"}, - {"type": "Comments", "value": {"field_label": "Other comments", "help_text": "", "info": None}, "id": "5028cac1-752f-4d47-b83a-4f766f19fb2d"} + {"type": "comments", "value": {"field_label": "Other comments", "help_text": "", "info": None}, "id": "5028cac1-752f-4d47-b83a-4f766f19fb2d"} ] concept_review_form, _ = ReviewForm.objects.get_or_create(name='Concept review', defaults={'form_fields': json.dumps(data3)}) @@ -191,8 +191,8 @@ class Command(BaseCommand): {"type": "text_markup", "value": "<h3>D. Rationale and appropriateness consideration</h3>", "id": "976386e1-3a66-490f-9e82-bfbe1f134cf2"}, {"type": "score", "value": {"field_label": "Rationale and appropriateness ", "help_text": "", "required": ""}, "id": "0d1bf533-968c-44b9-bb30-d437ae039474"}, {"type": "text_markup", "value": "<h3>E. General recommendation</h3>", "id": "976386e1-3a66-490f-9e82-bfbe1f134cf2"}, - {"type": "Recommendation", "value": {"field_label": "Recommendation", "help_text": "", "info": None}, "id": "4bf80578-1c8f-4515-9d6a-e52e87629e3e"}, - {"type": "Comments", "value": {"field_label": "Recommendation comments", "help_text": "", "info": None}, "id": "a814d7ac-8291-4f3e-b733-4a9a4f1f8a49"} + {"type": "recommendation", "value": {"field_label": "Recommendation", "help_text": "", "info": None}, "id": "4bf80578-1c8f-4515-9d6a-e52e87629e3e"}, + {"type": "comments", "value": {"field_label": "Recommendation comments", "help_text": "", "info": None}, "id": "a814d7ac-8291-4f3e-b733-4a9a4f1f8a49"} ] proposal_review_form, _ = ReviewForm.objects.get_or_create(name='Proposal review', defaults={'form_fields': json.dumps(data4)}) diff --git a/opentech/apply/funds/management/commands/seed_fellowship.py b/opentech/apply/funds/management/commands/seed_fellowship.py index 5fdc615c3..612cae7bb 100644 --- a/opentech/apply/funds/management/commands/seed_fellowship.py +++ b/opentech/apply/funds/management/commands/seed_fellowship.py @@ -116,10 +116,10 @@ class Command(BaseCommand): def create_fellowship_application_review_form(self): data3 = [ - {"type": "Recommendation", "value": {"field_label": "Overall, do you think we should select this applicant and their project to be part of the fellowship program?", "help_text": "", "info": None}, "id": "56264b32-fa39-4c08-b41e-68e9c54b2712"}, + {"type": "recommendation", "value": {"field_label": "Overall, do you think we should select this applicant and their project to be part of the fellowship program?", "help_text": "", "info": None}, "id": "56264b32-fa39-4c08-b41e-68e9c54b2712"}, {"type": "rich_text", "value": {"field_label": "If no, please select a reason why not.", "help_text": "", "required": "", "default_value": ""}, "id": "f0533950-57f5-4bb7-81ec-2d3813490c88"}, {"type": "rich_text", "value": {"field_label": "Request specific questions", "help_text": "", "required": "", "default_value": ""}, "id": "ba789376-e3f9-434e-8da5-330811723b30"}, - {"type": "Comments", "value": {"field_label": "Other comments", "help_text": "", "info": None}, "id": "e74e2581-d06c-43b1-9c0b-911407225834"} + {"type": "comments", "value": {"field_label": "Other comments", "help_text": "", "info": None}, "id": "e74e2581-d06c-43b1-9c0b-911407225834"} ] application_review_form, _ = ReviewForm.objects.get_or_create(name='Fellowship application review', defaults={'form_fields': json.dumps(data3)}) @@ -129,14 +129,14 @@ class Command(BaseCommand): def create_fellowship_proposal_review_form(self): data4 = [ - {"type": "Recommendation", "value": {"field_label": "Overall, do you think we should select this applicant and their project to be part of the fellowship program?", "help_text": "", "info": None}, "id": "e1ea4f9d-64e2-4f28-a68a-851ec0f2d9ad"}, + {"type": "recommendation", "value": {"field_label": "Overall, do you think we should select this applicant and their project to be part of the fellowship program?", "help_text": "", "info": None}, "id": "e1ea4f9d-64e2-4f28-a68a-851ec0f2d9ad"}, {"type": "rich_text", "value": {"field_label": "If no, please select a reason why not.", "help_text": "", "required": "", "default_value": ""}, "id": "e68b6fe9-8b11-4cf0-8ae4-2ffed75e1e80"}, {"type": "rich_text", "value": {"field_label": "If yes, but you believe some changes need to be made to the proposed effort, please let us know.", "help_text": "", "required": "", "default_value": ""}, "id": "a413f3a2-b486-4bf3-9e2d-c48d19626876"}, {"type": "score", "value": {"field_label": "Goals and principles", "help_text": "", "required": ""}, "id": "d40e541c-ccc0-4ede-94d1-bd8680b47004"}, {"type": "score", "value": {"field_label": "Technical merit", "help_text": "", "required": ""}, "id": "4af1e000-25be-4cf1-a787-8e5fd91feba8"}, {"type": "score", "value": {"field_label": "Reasonable and realistic", "help_text": "", "required": ""}, "id": "f839ec7e-1136-4fcd-b59e-c04e02d5abf6"}, {"type": "rich_text", "value": {"field_label": "Request specific questions", "help_text": "", "required": "", "default_value": ""}, "id": "536c963a-f183-45bc-b83f-458b46dc5542"}, - {"type": "Comments", "value": {"field_label": "Anything else you'd like to give us feedback on?", "help_text": "", "info": None}, "id": "cc82ba7b-b55e-4309-85f0-f68ad6f43471"} + {"type": "comments", "value": {"field_label": "Anything else you'd like to give us feedback on?", "help_text": "", "info": None}, "id": "cc82ba7b-b55e-4309-85f0-f68ad6f43471"} ] proposal_review_form, _ = ReviewForm.objects.get_or_create(name='Fellowship proposal review', defaults={'form_fields': json.dumps(data4)}) diff --git a/opentech/apply/funds/management/commands/seed_rapid_response.py b/opentech/apply/funds/management/commands/seed_rapid_response.py index 826240707..3fc80c2fa 100644 --- a/opentech/apply/funds/management/commands/seed_rapid_response.py +++ b/opentech/apply/funds/management/commands/seed_rapid_response.py @@ -93,14 +93,14 @@ class Command(BaseCommand): def create_rapid_response_review_form(self): data2 = [ - {"type": "Recommendation", "value": {"field_label": "Do you think we should support this request?", "help_text": "", "info": None}, "id": "d350fbf9-e332-4d7f-b238-7f545cff927a"}, + {"type": "recommendation", "value": {"field_label": "Do you think we should support this request?", "help_text": "", "info": None}, "id": "d350fbf9-e332-4d7f-b238-7f545cff927a"}, {"type": "rich_text", "value": {"field_label": "Things that you liked", "help_text": "", "required": "", "default_value": ""}, "id": "cec815a0-fab1-4142-9fc6-71319b054b2a"}, {"type": "rich_text", "value": {"field_label": "Things that concern you", "help_text": "", "required": "", "default_value": ""}, "id": "6915acf0-9a19-4e73-8d2b-d96e39e3b00e"}, {"type": "score", "value": {"field_label": "How appropriate are the proposed objectives for rapid response support?", "help_text": "", "required": ""}, "id": "71bfe95d-89c5-401b-ae7a-778e91d5c8c5"}, {"type": "score", "value": {"field_label": "How would you rate the applicant's capacity and knowledge to carry out this project?", "help_text": "", "required": ""}, "id": "3aa164c1-4386-4046-997a-a2778e1d894e"}, {"type": "score", "value": {"field_label": "Does the applicant provide sufficient justification for the amount of funding requested (is this cost effective)?", "help_text": "", "required": ""}, "id": "7cc12bb6-4c12-48aa-a269-1fd6d725abfe"}, {"type": "rich_text", "value": {"field_label": "Justification comments", "help_text": "", "required": "", "default_value": ""}, "id": "abc61bba-2a9e-4a9e-8c06-a1824ea2a998"}, - {"type": "Comments", "value": {"field_label": "Other comments", "help_text": "", "info": None}, "id": "d94e51d3-026c-443f-a98a-a66b1f6c968c"} + {"type": "comments", "value": {"field_label": "Other comments", "help_text": "", "info": None}, "id": "d94e51d3-026c-443f-a98a-a66b1f6c968c"} ] rapid_response_review_form, _ = ReviewForm.objects.get_or_create(name='Rapid response review', defaults={'form_fields': json.dumps(data2)}) -- GitLab