akvo.rsr.models.custom_field module
- class akvo.rsr.models.custom_field.OrganisationCustomField(*args, **kwargs)[source]
Bases:
Model
Custom fields make it possible for partner to specify additional fields. When specified for a project, the fields will appear in the admin (under the specified section) and can then be filled in.
Custom fields for an organisation, linking the organisation to its’ custom fields.
These custom fields will be used for the projects whenever a user of the organisation creates a new project.
Name: name of the custom field (label in the admin) Section: the section in the admin where the field should be added Maxlength: the maximum number of characters of the field Help text: the help text belonging to the field
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- SECTIONS = ((1, '01 - General information'), (2, '02 - Contact information'), (3, '03 - Project partners'), (4, '04 - Project descriptions'), (5, '05 - Results and indicators'), (6, '06 - Finance'), (7, '07 - Project locations'), (8, '08 - Project focus'), (9, '09 - Links and documents'), (10, '10 - Project comments'))
- TYPES = (('text', 'Text'), ('boolean', 'Checkbox'), ('dropdown', 'Dropdown'))
- dropdown_options
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_section_display(*, field=<django.db.models.fields.IntegerField: section>)
- get_type_display(*, field=<akvo.rsr.fields.ValidXMLCharField: type>)
- help_text
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- mandatory
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- max_characters
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- order
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- organisation
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organisation_id
- section
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- show_in_searchbar
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class akvo.rsr.models.custom_field.ProjectCustomField(*args, **kwargs)[source]
Bases:
Model
Custom fields make it possible for partner to specify additional fields. When specified for a project, the fields will appear in the admin (under the specified section) and can then be filled in.
Custom fields for a project, linking the project to its’ custom fields.
Name: name of the custom field (label in the admin) Section: the section in the admin where the field should be added Maxlength: the maximum number of characters of the field Help text: the help text belonging to the field Value: the value which can be filled in the project admin.
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- SECTIONS = ((1, '01 - General information'), (2, '02 - Contact information'), (3, '03 - Project partners'), (4, '04 - Project descriptions'), (5, '05 - Results and indicators'), (6, '06 - Finance'), (7, '07 - Project locations'), (8, '08 - Project focus'), (9, '09 - Links and documents'), (10, '10 - Project comments'))
- TYPES = (('text', 'Text'), ('boolean', 'Checkbox'), ('dropdown', 'Dropdown'))
- dropdown_options
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- dropdown_selection
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_section_display(*, field=<django.db.models.fields.IntegerField: section>)
- get_type_display(*, field=<akvo.rsr.fields.ValidXMLCharField: type>)
- help_text
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- mandatory
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- max_characters
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- order
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- project
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- project_id
- section
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- value
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.