Utils
hypha.apply.funds.models.utils
¶
REVIEW_GROUPS
module-attribute
¶
REVIEW_GROUPS = [STAFF_GROUP_NAME, REVIEWER_GROUP_NAME, COMMUNITY_REVIEWER_GROUP_NAME]
LIMIT_TO_STAFF
module-attribute
¶
LIMIT_TO_STAFF = {'groups__name': STAFF_GROUP_NAME, 'is_active': True}
LIMIT_TO_REVIEWERS
module-attribute
¶
LIMIT_TO_REVIEWERS = {'groups__name': REVIEWER_GROUP_NAME, 'is_active': True}
LIMIT_TO_PARTNERS
module-attribute
¶
LIMIT_TO_PARTNERS = {'groups__name': PARTNER_GROUP_NAME, 'is_active': True}
LIMIT_TO_COMMUNITY_REVIEWERS
module-attribute
¶
LIMIT_TO_COMMUNITY_REVIEWERS = {'groups__name': COMMUNITY_REVIEWER_GROUP_NAME, 'is_active': True}
LIMIT_TO_REVIEWER_GROUPS
module-attribute
¶
LIMIT_TO_REVIEWER_GROUPS = {'groups__name__in': REVIEW_GROUPS, 'is_active': True}
WorkflowHelpers
¶
Bases: Model
Defines the common methods and fields for working with Workflows within Django models
SubmittableStreamForm
¶
Bases: AbstractStreamForm
Controls how stream forms are submitted. Any Page allowing submissions should inherit from here.
submission_form_class
class-attribute
instance-attribute
¶
submission_form_class = PageStreamBaseForm
wagtail_reference_index_ignore
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
¶
get_submission_class
¶
process_form_submission
¶
Source code in hypha/apply/funds/models/utils.py
WorkflowStreamForm
¶
Bases: WorkflowHelpers
, AbstractStreamForm
Defines the common methods and fields for working with Workflows within Wagtail pages
submission_form_class
class-attribute
instance-attribute
¶
submission_form_class = PageStreamBaseForm
WORKFLOW_CHOICES
class-attribute
instance-attribute
¶
WORKFLOW_CHOICES = {name: _lo8for (name, workflow) in items()}
workflow_name
class-attribute
instance-attribute
¶
workflow_name = CharField(choices=items(), max_length=100, default='single', verbose_name=gettext_lazy('Workflow'))
wagtail_reference_index_ignore
class-attribute
instance-attribute
¶
content_panels
class-attribute
instance-attribute
¶
content_panels = content_panels + [FieldPanel('workflow_name'), InlinePanel('forms', label=gettext_lazy('Application forms')), InlinePanel('review_forms', label=gettext_lazy('Internal Review Forms')), InlinePanel('external_review_forms', label=gettext_lazy('External Review Forms'), max_num=1, help_text='Add a form to be used by external reviewers.'), InlinePanel('determination_forms', label=gettext_lazy('Determination Forms'))]
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_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_defined_fields
¶
render_landing_page
¶
Source code in hypha/apply/funds/models/utils.py
EmailForm
¶
Bases: AbstractEmailForm
Defines the behaviour for pages that hold information about emailing applicants
Email Confirmation Panel should be included to allow admins to make changes.
confirmation_text_extra
class-attribute
instance-attribute
¶
confirmation_text_extra = TextField(blank=True, help_text=gettext_lazy('Additional text for the application confirmation message.'))
email_confirmation_panels
class-attribute
instance-attribute
¶
email_confirmation_panels = [MultiFieldPanel([FieldRowPanel([FieldPanel('from_address', classname='col6'), FieldPanel('to_address', classname='col6')]), FieldPanel('subject'), FieldPanel('confirmation_text_extra')], heading=gettext_lazy('Confirmation email'))]
email_tab
class-attribute
instance-attribute
¶
email_tab = ObjectList(email_confirmation_panels, heading=gettext_lazy('Confirmation email'))