Migrate fellowship proposals
hypha.apply.funds.management.commands.migrate_fellowship_proposals
¶
Command
¶
Bases: MigrateCommand
help
class-attribute
instance-attribute
¶
patched_status_field
class-attribute
instance-attribute
¶
patched_status_field = FSMField(default=INITIAL_STATE, protected=False)
STREAMFIELD_MAP
class-attribute
instance-attribute
¶
STREAMFIELD_MAP = {'title': {'id': 'title', 'type': 'direct'}, 'field_proposal_common_name': {'id': 'full_name', 'type': 'value', 'key': 'safe_value'}, 'field_proposal_host_text': {'id': 'bc03235e-3c78-4770-9fc2-97feb93c2c8c', 'type': 'value', 'key': 'safe_value'}, 'field_proposal_start_date': {'id': '672cb6f1-335c-4005-a0f1-46c414feda06', 'type': 'value', 'key': 'value'}, 'field_proposal_completion_date': {'id': '8262f209-f084-4a79-9dfa-2d18137119bb', 'type': 'value', 'key': 'value'}, 'field_proposal_objectives': {'id': 'af2c5f38-7257-4295-87fa-787060e845ef', 'type': 'value', 'key': 'safe_value'}, 'field_proposal_activities': {'id': '3c521847-7642-4cae-aca9-d5336ad8962d', 'type': 'value', 'key': 'safe_value'}, 'field_proposal_sustainability': {'id': 'fd0eb7ea-e054-4bcf-9580-eb672d44745c', 'type': 'value', 'key': 'safe_value'}, 'field_proposal_request_questions': {'id': 'b6d71932-98c2-4ce8-a5e6-454a1f800d21', 'type': 'merge_value', 'key': 'safe_value'}, 'field_proposal_upload': {'id': '30dfa46e-f656-46c9-9efc-bab9029f2008', 'type': 'file'}}
REQUEST_QUESTION_MAP
class-attribute
instance-attribute
¶
REQUEST_QUESTION_MAP = {'3618': {0: 'How will this project leverage the resources made available by the host organization?', 1: 'Please detail the specific steps the applicant will take to ensure the project outcomes reach non-technical audiences', 2: 'In what ways will this effort advance understanding in the relevant field?', 3: 'What risks or variables could jeopardize either the outcomes of the project or the safety of the applicant?', 4: 'How is the applicant well equipped to carry out the technical work proposed? (if applicable)'}, '3681': {0: 'Please detail the specific steps the applicant will take to ensure the project outcomes reach the internet freedom technology community.', 1: 'What risks could jeopardize the fellowship project?', 2: 'How would those risks be mitigated or addressed?', 3: 'How will your work be sustained following the completion of your fellowship?', 4: 'If your project includes public gatherings, do you have a code of conduct? If yes, please list below or provide links to where it can be publicly accessed.', 5: 'Please include letters of support for the organization or organizations you would be working with (Please attach a file at the bottom of the application)'}}
add_arguments
¶
handle
¶
Source code in hypha/apply/funds/management/commands/migration_base.py
process
¶
Source code in hypha/apply/funds/management/commands/migration_base.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
|
get_user
¶
get_field_value
¶
Handles the following formats: field: {(safe_)value: VALUE} field: {target_id: ID} -- Drupal ForeignKey. Reference to other node or user entities. field: {tid: ID} -- or term ID. fk to Categories field: [] field: [{value|target_id|tid: VALUE},]