akvo.rsr.models.result.disaggregation module

class akvo.rsr.models.result.disaggregation.Disaggregation(*args, **kwargs)[source]

Bases: TimestampsMixin, IndicatorUpdateMixin, Model

Model for storing a disaggregated value along one axis of a dimension.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

created_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

delete(*args, **kwargs)[source]
denominator

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

dimension_value

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 a ForwardManyToOneDescriptor instance.

dimension_value_id
disaggregation_total()[source]
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

incomplete_data

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

last_modified_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

narrative

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

numerator

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>
save(*args, **kwargs)[source]

Save the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

siblings()[source]
update

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 a ForwardManyToOneDescriptor instance.

update_id
update_incomplete_data()[source]
value

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

akvo.rsr.models.result.disaggregation.mark_incomplete_disaggregations(sender, **kwargs)[source]

Mark disaggregations as incomplete if they don’t add up to the period value.

akvo.rsr.models.result.disaggregation.mark_incomplete_disaggregations_on_update_change(sender, **kwargs)[source]

Mark disaggregations as incomplete if they don’t add up to the period value.