Project
hypha.apply.projects.models.project
¶
PAF_STATUS_CHOICES
module-attribute
¶
PAF_STATUS_CHOICES = ((APPROVE, 'Approve'), (REQUEST_CHANGE, 'Request changes or more information'))
PROJECT_STATUS_CHOICES
module-attribute
¶
PROJECT_STATUS_CHOICES = [(DRAFT, gettext_lazy('Draft')), (INTERNAL_APPROVAL, gettext_lazy('Internal approval')), (CONTRACTING, gettext_lazy('Contracting')), (INVOICING_AND_REPORTING, gettext_lazy('Invoicing and reporting')), (CLOSING, gettext_lazy('Closing')), (COMPLETE, gettext_lazy('Complete'))]
PROJECT_PUBLIC_STATUSES
module-attribute
¶
PROJECT_PUBLIC_STATUSES = [(DRAFT, gettext_lazy('Draft')), (INTERNAL_APPROVAL, format(ORG_SHORT_NAME)), (CONTRACTING, gettext_lazy('Contracting')), (INVOICING_AND_REPORTING, gettext_lazy('Invoicing and reporting')), (CLOSING, gettext_lazy('Closing')), (COMPLETE, gettext_lazy('Complete'))]
ProjectQuerySet
¶
Bases: QuerySet
active
¶
in_progress
¶
invoicing_and_reporting
¶
complete
¶
in_contracting
¶
internal_approval
¶
by_end_date
¶
with_amount_paid
¶
with_last_payment
¶
with_outstanding_reports
¶
Source code in hypha/apply/projects/models/project.py
with_start_date
¶
Source code in hypha/apply/projects/models/project.py
for_table
¶
for_reporting_table
¶
Source code in hypha/apply/projects/models/project.py
Project
¶
Bases: BaseStreamForm
, AccessFormData
, Model
submission_form_class
class-attribute
instance-attribute
¶
submission_form_class = PageStreamBaseForm
lead
class-attribute
instance-attribute
¶
submission
class-attribute
instance-attribute
¶
user
class-attribute
instance-attribute
¶
value
class-attribute
instance-attribute
¶
value = DecimalField(default=0, max_digits=20, decimal_places=2, validators=[MinValueValidator(limit_value=0)])
proposed_start
class-attribute
instance-attribute
¶
proposed_end
class-attribute
instance-attribute
¶
status
class-attribute
instance-attribute
¶
status = TextField(choices=PROJECT_STATUS_CHOICES, default=DRAFT)
form_data
class-attribute
instance-attribute
¶
form_data = JSONField(encoder=StreamFieldDataEncoder, default=dict)
form_fields
class-attribute
instance-attribute
¶
form_fields = StreamField(ProjectFormCustomFormFieldsBlock(), null=True, use_json_field=True)
submitted_contract_documents
class-attribute
instance-attribute
¶
activities
class-attribute
instance-attribute
¶
activities = GenericRelation('activity.Activity', content_type_field='source_content_type', object_id_field='source_object_id', related_query_name='project')
external_projectid
class-attribute
instance-attribute
¶
external_projectid = CharField(max_length=30, blank=True, help_text='ID of this project at integrated payment service.')
external_project_information
class-attribute
instance-attribute
¶
external_project_information = JSONField(default=dict, help_text='More details of the project integrated at payment service.')
sent_to_compliance_at
class-attribute
instance-attribute
¶
paf_reviews_meta_data
class-attribute
instance-attribute
¶
paf_reviews_meta_data = JSONField(default=dict, help_text='Reviewers role and their actions/comments')
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
user_has_updated_pf_details
property
¶
Determines if the user has updated the Project Form
user_has_updated_sow_details
property
¶
Determines if the user has updated the SOW form
If there is no configured SOW, None will be returned
can_send_for_approval
property
¶
Wrapper to expose the pending approval state
We don't want to expose a "Sent for Approval" state to the end User so we infer it from the current status being "Comitted" and the Project being locked.
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/stream_forms/models.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
¶
Source code in hypha/apply/funds/models/mixins.py
get_multi_inputs_answer
¶
Source code in hypha/apply/funds/models/mixins.py
render_answer
¶
Source code in hypha/apply/funds/models/mixins.py
render_answers
¶
render_first_group_text_answers
¶
render_text_blocks_answers
¶
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
deserialize_form_data
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
get_defined_fields
¶
get_form_fields
¶
Source code in hypha/apply/stream_forms/models.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 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 |
|
get_form_class
¶
get_address_display
¶
create_from_submission
classmethod
¶
Create a Project from the given submission.
Returns a new Project or the given ApplicationSubmissions existing Project.
Source code in hypha/apply/projects/models/project.py
paid_value
¶
unpaid_value
¶
clean
¶
Source code in hypha/apply/projects/models/project.py
save
¶
Source code in hypha/apply/projects/models/project.py
editable_by
¶
Source code in hypha/apply/projects/models/project.py
get_absolute_url
¶
can_request_funding
¶
ProjectSOW
¶
Bases: BaseStreamForm
, AccessFormData
, Model
submission_form_class
class-attribute
instance-attribute
¶
submission_form_class = PageStreamBaseForm
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
project
class-attribute
instance-attribute
¶
project = OneToOneField(Project, related_name='sow', on_delete=CASCADE)
form_data
class-attribute
instance-attribute
¶
form_data = JSONField(encoder=StreamFieldDataEncoder, default=dict)
form_fields
class-attribute
instance-attribute
¶
form_fields = StreamField(ProjectFormCustomFormFieldsBlock(), null=True, use_json_field=True)
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/stream_forms/models.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
¶
Source code in hypha/apply/funds/models/mixins.py
get_multi_inputs_answer
¶
Source code in hypha/apply/funds/models/mixins.py
render_answer
¶
Source code in hypha/apply/funds/models/mixins.py
render_answers
¶
render_first_group_text_answers
¶
render_text_blocks_answers
¶
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
deserialize_form_data
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
get_defined_fields
¶
get_form_fields
¶
Source code in hypha/apply/stream_forms/models.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 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 |
|
get_form_class
¶
ProjectBaseStreamForm
¶
Bases: BaseStreamForm
, Model
submission_form_class
class-attribute
instance-attribute
¶
submission_form_class = PageStreamBaseForm
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
form_fields
class-attribute
instance-attribute
¶
form_fields = StreamField(ProjectFormCustomFormFieldsBlock(), use_json_field=True)
panels
class-attribute
instance-attribute
¶
from_db
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
deserialize_form_data
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
get_defined_fields
¶
get_form_fields
¶
Source code in hypha/apply/stream_forms/models.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 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 |
|
get_form_class
¶
ProjectForm
¶
Bases: ProjectBaseStreamForm
submission_form_class
class-attribute
instance-attribute
¶
submission_form_class = PageStreamBaseForm
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
form_fields
class-attribute
instance-attribute
¶
form_fields = StreamField(ProjectFormCustomFormFieldsBlock(), use_json_field=True)
panels
class-attribute
instance-attribute
¶
from_db
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
deserialize_form_data
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
get_defined_fields
¶
get_form_fields
¶
Source code in hypha/apply/stream_forms/models.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 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 |
|
get_form_class
¶
ProjectSOWForm
¶
Bases: ProjectBaseStreamForm
submission_form_class
class-attribute
instance-attribute
¶
submission_form_class = PageStreamBaseForm
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
form_fields
class-attribute
instance-attribute
¶
form_fields = StreamField(ProjectFormCustomFormFieldsBlock(), use_json_field=True)
panels
class-attribute
instance-attribute
¶
from_db
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
deserialize_form_data
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
get_defined_fields
¶
get_form_fields
¶
Source code in hypha/apply/stream_forms/models.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 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 |
|
get_form_class
¶
ProjectReportForm
¶
Bases: ProjectBaseStreamForm
An Applicant Report Form can be attached to a Fund to collect reports from Applicants aka Grantees during the Project. It is only relevant for accepted or granted Submissions which is why it is attached to Project. It is similar to the other Forms (PAF, SOW) in that it uses StreamForm to allow maximum flexibility in form creation. See Also ReportVersion where the fields from the form get copied and the response data gets filled in.
submission_form_class
class-attribute
instance-attribute
¶
submission_form_class = PageStreamBaseForm
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
form_fields
class-attribute
instance-attribute
¶
form_fields = StreamField(ProjectFormCustomFormFieldsBlock(), use_json_field=True)
panels
class-attribute
instance-attribute
¶
from_db
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
deserialize_form_data
classmethod
¶
Source code in hypha/apply/stream_forms/models.py
get_defined_fields
¶
get_form_fields
¶
Source code in hypha/apply/stream_forms/models.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 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 |
|
get_form_class
¶
PAFReviewersRole
¶
Bases: Orderable
, ClusterableModel
user_roles
class-attribute
instance-attribute
¶
user_roles = ParentalManyToManyField(Group, verbose_name=gettext_lazy('user groups'), help_text=gettext_lazy("Only selected group's users will be listed for this ProjectFormReviewerRole"), related_name='paf_reviewers_roles')
page
class-attribute
instance-attribute
¶
panels
class-attribute
instance-attribute
¶
ProjectReminderFrequency
¶
Bases: Orderable
, ClusterableModel
page
class-attribute
instance-attribute
¶
relation
class-attribute
instance-attribute
¶
relation = CharField(max_length=2, choices=choices, default=BEFORE)
panels
class-attribute
instance-attribute
¶
panels = [FieldPanel('reminder_days', heading=gettext_lazy('Number of days')), FieldPanel('relation', heading=gettext_lazy('Relation to report due date'))]