akvo.rsr.models.result.indicator module
- class akvo.rsr.models.result.indicator.Indicator(id, result, parent_indicator, title, type, measure, ascending, cumulative, description, baseline_year, baseline_value, baseline_comment, target_value, target_comment, order, export_to_iati, scores, baseline_score, target_score)[source]
Bases:
Model
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- INDICATOR_TYPES = ((1, 'Quantitative'), (2, 'Qualitative'))
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- ascending
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- baseline_comment
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- baseline_score
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- baseline_value
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- baseline_year
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- child_indicators
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- property children_aggregate_percentage
Returns True if this indicator has percentage as a measure and has children that aggregate to this indicator.
- clean()[source]
Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.
- cumulative
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- custom_values
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- delete(*args, **kwargs)[source]
Check if indicator is ordered manually, and cascade following indicators if needed
- description
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- dimension_names
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- disaggregation_targets
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- enumerators
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- export_to_iati
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_measure_display(*, field=<akvo.rsr.fields.ValidXMLCharField: measure>)
- get_type_display(*, field=<django.db.models.fields.PositiveSmallIntegerField: type>)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_cumulative()[source]
The cumulative setting is ignored if the indicator is a percentage measure because the percentage measure can only be updated once per period.
- labels
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- measure
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.
- parent_indicator
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.
- parent_indicator_id
- perioddisaggregation_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- periods
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- project_relation = 'results__indicators__in'
- references
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- result
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.
- result_id
- save(*args, **kwargs)[source]
Update the values of child indicators, if a parent indicator is updated.
- scores
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- target_comment
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- target_score
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- target_value
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- title
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.