Blocks
hypha.apply.funds.blocks
¶
REQUIRED_BLOCK_NAMES
module-attribute
¶
REQUIRED_BLOCK_NAMES = [block.name for block in ApplicationMustIncludeFieldBlock.__subclasses__()]
SINGLE_BLOCK_NAMES
module-attribute
¶
SINGLE_BLOCK_NAMES = [block.name for block in ApplicationSingleIncludeFieldBlock.__subclasses__()]
LocalizedFloatField
¶
Bases: FloatField
FloatField that accepts locale-formatted numbers without relying on the active locale. Assumes at most two decimal places (no cents sub-divisions), which makes the separator role unambiguous:
- Both . and , present: whichever comes last is the decimal separator.
- Single separator with exactly 3 digits after it: thousands separator.
- Single separator with 1 or 2 digits after it: decimal separator.
- Multiple identical separators: all are thousands separators.
to_python
¶
Source code in hypha/apply/funds/blocks.py
prepare_value
¶
Source code in hypha/apply/funds/blocks.py
ApplicationSingleIncludeFieldBlock
¶
Bases: SingleIncludeBlock
Source code in hypha/apply/utils/blocks.py
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
ApplicationMustIncludeFieldBlock
¶
Bases: MustIncludeFieldBlock
Source code in hypha/apply/utils/blocks.py
help_text
class-attribute
instance-attribute
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
get_field
¶
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
TitleBlock
¶
Bases: ApplicationMustIncludeFieldBlock
Source code in hypha/apply/utils/blocks.py
field_label
class-attribute
instance-attribute
¶
field_label = blocks.CharBlock(label=_('Label'), default=_('What is the title of your application?'))
help_text
class-attribute
instance-attribute
¶
help_text = blocks.RichTextBlock(required=False, label=_('Help text'), default=_('This project name can be changed if a full proposal is requested.'))
max_length
class-attribute
instance-attribute
¶
Meta
¶
get_field_kwargs
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field
¶
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
ValueBlock
¶
Bases: ApplicationSingleIncludeFieldBlock
Source code in hypha/apply/utils/blocks.py
widget
class-attribute
instance-attribute
¶
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
Meta
¶
get_field_kwargs
¶
prepare_data
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field
¶
decode
¶
serialize
¶
serialize_no_response
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
OrganizationNameBlock
¶
Bases: ApplicationSingleIncludeFieldBlock
Source code in hypha/apply/utils/blocks.py
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
EmailBlock
¶
Bases: ApplicationMustIncludeFieldBlock
Source code in hypha/apply/utils/blocks.py
field_label
class-attribute
instance-attribute
¶
field_label = blocks.CharBlock(label=_('Label'), default=_('What email address should we use to contact you?'))
help_text
class-attribute
instance-attribute
¶
help_text = blocks.RichTextBlock(required=False, label=_('Help text'), default=_('We will use this email address to communicate with you about your proposal.'))
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
get_field
¶
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
AddressFieldBlock
¶
Bases: ApplicationSingleIncludeFieldBlock
Source code in hypha/apply/utils/blocks.py
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
Meta
¶
format_data
¶
prepare_data
¶
Source code in hypha/apply/funds/blocks.py
get_slug
¶
get_field_class
¶
get_widget
¶
get_field_kwargs
¶
Source code in hypha/apply/stream_forms/blocks.py
get_field
¶
decode
¶
serialize
¶
serialize_no_response
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
FullNameBlock
¶
Bases: ApplicationMustIncludeFieldBlock
Source code in hypha/apply/utils/blocks.py
field_label
class-attribute
instance-attribute
¶
help_text
class-attribute
instance-attribute
¶
help_text = blocks.RichTextBlock(required=False, label=_('Help text'), default=_('We will use this name when we communicate with you about your proposal.'))
Meta
¶
get_field_kwargs
¶
get_slug
¶
get_field_class
¶
get_widget
¶
get_field
¶
decode
¶
serialize
¶
serialize_no_response
¶
prepare_data
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
DurationBlock
¶
Bases: ApplicationSingleIncludeFieldBlock
Source code in hypha/apply/utils/blocks.py
DURATION_TYPE_CHOICES
class-attribute
instance-attribute
¶
DURATION_DAY_OPTIONS
class-attribute
instance-attribute
¶
DURATION_DAY_OPTIONS = {i: format_lazy(ngettext_lazy('{} day', '{} days', i), i) for i in range(1, 8)}
DURATION_WEEK_OPTIONS
class-attribute
instance-attribute
¶
DURATION_WEEK_OPTIONS = {i: format_lazy(ngettext_lazy('{} week', '{} weeks', i), i) for i in range(1, 13)}
DURATION_MONTH_OPTIONS
class-attribute
instance-attribute
¶
DURATION_MONTH_OPTIONS = {i: format_lazy(ngettext_lazy('{} month', '{} months', i), i) for i in [*range(1, 13), 18, 24, 36]}
duration_type
class-attribute
instance-attribute
¶
duration_type = blocks.ChoiceBlock(help_text=_('Duration type is used to display duration choices in Days, Weeks or Months in application forms. Be careful, changing the duration type in the active round can result in data inconsistency.'), choices=DURATION_TYPE_CHOICES, default=MONTHS)
help_text
class-attribute
instance-attribute
¶
required
class-attribute
instance-attribute
¶
get_field_kwargs
¶
Source code in hypha/apply/funds/blocks.py
prepare_data
¶
Source code in hypha/apply/funds/blocks.py
get_slug
¶
get_field_class
¶
get_widget
¶
get_field
¶
decode
¶
serialize
¶
serialize_no_response
¶
render
¶
Source code in hypha/apply/stream_forms/blocks.py
get_searchable_content
¶
ApplicationCustomFormFieldsBlock
¶
Bases: CustomFormFieldsBlock, FormFieldsBlock
Source code in hypha/apply/utils/blocks.py
required_blocks
class-attribute
instance-attribute
¶
required_blocks = ApplicationMustIncludeFieldBlock.__subclasses__()
single_blocks
class-attribute
instance-attribute
¶
single_blocks = ApplicationSingleIncludeFieldBlock.__subclasses__()
text_markup
class-attribute
instance-attribute
¶
header_markup
class-attribute
instance-attribute
¶
header_markup = HeadingBlock(group=_('Custom'), label=_('Section header'))
multi_inputs_char
class-attribute
instance-attribute
¶
multi_inputs_char = MultiInputCharFieldBlock(group=_('Fields'))
checkboxes
class-attribute
instance-attribute
¶
checkboxes = CheckboxesFieldBlock(group=_('Fields'))
group_toggle
class-attribute
instance-attribute
¶
group_toggle = GroupToggleBlock(group=_('Custom'))
group_toggle_end
class-attribute
instance-attribute
¶
group_toggle_end = GroupToggleEndBlock(group=_('Custom'))
markdown_text
class-attribute
instance-attribute
¶
markdown_text = MarkdownTextFieldBlock(group=_('Fields'))