akvo.rsr.models.result.result module

class akvo.rsr.models.result.result.Result(id, project, title, type, aggregation_status, description, parent_result, order)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

aggregation_status

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

child_projects()[source]

Return a dictionary of this result’s child projects.

child_results

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

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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.

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

Check if indicator is ordered manually, and cascade following indicators if needed

descendants(depth=None)[source]
description

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

get_type_display(*, field=<akvo.rsr.fields.ValidXMLCharField: type>)
has_info()[source]
iati_type()[source]
iati_type_unicode()[source]
id

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

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

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

is_calculated()[source]
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_project()[source]

Return a dictionary of this result’s parent project.

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

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

project_id
save(*args, **kwargs)[source]

Update the values of child results, if a parent result is updated.

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.