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)
user_has_updated_details
class-attribute
instance-attribute
¶
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
¶
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.
program_project_id
property
¶
Program project id is used to fetch deliverables from IntAcct.
Stored in external_project_information as the first item of referenceno(PONUMBER).
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 148 |
|
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 148 |
|
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 148 |
|
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 148 |
|
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 148 |
|
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.
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'))]
ProjectSettings
¶
Bases: BaseSiteSetting
, ClusterableModel
contracting_gp_email
class-attribute
instance-attribute
¶
finance_gp_email
class-attribute
instance-attribute
¶
staff_gp_email
class-attribute
instance-attribute
¶
paf_approval_sequential
class-attribute
instance-attribute
¶
paf_approval_sequential = BooleanField(default=True, help_text='Uncheck it to approve project parallely')
panels
class-attribute
instance-attribute
¶
panels = [FieldPanel('staff_gp_email'), FieldPanel('contracting_gp_email'), FieldPanel('finance_gp_email'), MultiFieldPanel([FieldPanel('paf_approval_sequential', heading='Approve Project Sequentially'), InlinePanel('paf_reviewers_roles', label=gettext_lazy('Project Form Reviewers Roles'))], heading=gettext_lazy('Project Reviewers Roles'), help_text=gettext_lazy("Reviewer Roles are needed to move projects to 'Internal Approval' stage. Delete all roles to skip internal approval process and to move all internal approval projects back to the 'Draft' stage with all approvals removed.")), InlinePanel('reminder_frequencies', label=gettext_lazy('Report reminder frequency'), heading=gettext_lazy('Report reminder frequency'), help_text=gettext_lazy('Set up a cron job to run `notify_report_due.py`. The script will use these reminder settings.'))]
PAFApprovals
¶
ContractQuerySet
¶
Contract
¶
Bases: Model
approver
class-attribute
instance-attribute
¶
project
class-attribute
instance-attribute
¶
file
class-attribute
instance-attribute
¶
file = FileField(upload_to=contract_path, storage=PrivateStorage())
signed_and_approved
class-attribute
instance-attribute
¶
signed_by_applicant
class-attribute
instance-attribute
¶
uploaded_by_contractor_at
class-attribute
instance-attribute
¶
uploaded_by_applicant_at
class-attribute
instance-attribute
¶
save
¶
PacketFile
¶
Bases: Model
category
class-attribute
instance-attribute
¶
category = ForeignKey('DocumentCategory', null=True, on_delete=CASCADE, related_name='packet_files')
project
class-attribute
instance-attribute
¶
document
class-attribute
instance-attribute
¶
document = FileField(upload_to=document_path, storage=PrivateStorage())
created_at
class-attribute
instance-attribute
¶
ContractPacketFile
¶
Bases: Model
category
class-attribute
instance-attribute
¶
category = ForeignKey('ContractDocumentCategory', null=True, on_delete=CASCADE, related_name='contract_packet_files')
project
class-attribute
instance-attribute
¶
document
class-attribute
instance-attribute
¶
document = FileField(upload_to=contract_document_path, storage=PrivateStorage())
created_at
class-attribute
instance-attribute
¶
DocumentCategory
¶
Bases: Model
recommended_minimum
class-attribute
instance-attribute
¶
template
class-attribute
instance-attribute
¶
template = FileField(upload_to=document_template_path, storage=PrivateStorage(), blank=True, null=True)
panels
class-attribute
instance-attribute
¶
ContractDocumentCategory
¶
Bases: Model
recommended_minimum
class-attribute
instance-attribute
¶
document_access_view
class-attribute
instance-attribute
¶
document_access_view = ManyToManyField(Group, limit_choices_to={'name__in': ROLES_ORG_FACULTY}, verbose_name=gettext_lazy('Allow document access for groups'), help_text=gettext_lazy("Only selected group's users can access the document"), related_name='contract_document_category', blank=True)
template
class-attribute
instance-attribute
¶
template = FileField(upload_to=contract_document_template_path, storage=PrivateStorage(), blank=True, null=True)
panels
class-attribute
instance-attribute
¶
panels = [FieldPanel('name'), FieldPanel('required'), FieldPanel('document_access_view', widget=CheckboxSelectMultiple), FieldPanel('template')]
base_form_class
class-attribute
instance-attribute
¶
base_form_class = ContractDocumentCategoryAdminForm
Deliverable
¶
Bases: Model
external_id
class-attribute
instance-attribute
¶
external_id = CharField(max_length=30, blank=True, help_text='ID of this deliverable at integrated payment service.')
available_to_invoice
class-attribute
instance-attribute
¶
unit_price
class-attribute
instance-attribute
¶
unit_price = DecimalField(max_digits=10, decimal_places=2, validators=[MinValueValidator(Decimal('0.01'))])
extra_information
class-attribute
instance-attribute
¶
extra_information = JSONField(default=dict, help_text='More details of the deliverable at integrated payment service.')