Mixins
hypha.apply.funds.models.mixins
¶
UnusedFieldException
¶
Bases: Exception
AccessFormData
¶
Mixin for interacting with form data from streamfields
requires
- form_data > jsonfield containing the submitted data
- form_fields > streamfield containing the original form fields
stream_file
classmethod
¶
Source code in hypha/apply/funds/models/mixins.py
process_file
classmethod
¶
process_file_data
¶
Source code in hypha/apply/funds/models/mixins.py
extract_files
¶
from_db
classmethod
¶
Source code in hypha/apply/funds/models/mixins.py
deserialised_data
classmethod
¶
Source code in hypha/apply/funds/models/mixins.py
get_definitive_id
¶
field
¶
data
¶
get_serialize_multi_inputs_answer
¶
Source code in hypha/apply/funds/models/mixins.py
serialize
¶
Serialize a single answer.
Never redacted: unlike render_answer() this does not consult is_pii,
so everything reached through it is for staff-only views and exports.
Source code in hypha/apply/funds/models/mixins.py
get_multi_inputs_answer
¶
Source code in hypha/apply/funds/models/mixins.py
field_is_pii
staticmethod
¶
Has this field been marked as containing personal information?
Source code in hypha/apply/funds/models/mixins.py
render_answer
¶
Source code in hypha/apply/funds/models/mixins.py
render_answers
¶
Source code in hypha/apply/funds/models/mixins.py
render_first_group_text_answers
¶
Render the text answers of the first group, never redacted.
Answers marked as personal information are rendered in the clear, so only use this where the view is already restricted to staff.
Source code in hypha/apply/funds/models/mixins.py
render_text_blocks_answers
¶
Render the answers of type text, never redacted.
Answers marked as personal information are rendered in the clear, so
only use this where the view is already restricted to staff. Its one
caller is the revision comparison view, which is staff_required.
Source code in hypha/apply/funds/models/mixins.py
output_answers
¶
output_text_answers
¶
output_first_group_text_answers
¶
get_answer_from_label
¶
Source code in hypha/apply/funds/models/mixins.py
get_text_questions_answers_as_dict
¶
Map each text question to its answer, never redacted.
Goes through serialize(), which ignores is_pii, so answers marked as
personal information are included in the clear. Its one caller is the
submission PDF download, which is staff_required.