akvo.rsr.models package

class akvo.rsr.models.AdministrativeLocation(id, location, code, vocabulary, level)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

code

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

get_vocabulary_display(*, field=<akvo.rsr.fields.ValidXMLCharField: vocabulary>)
iati_vocabulary()[source]
iati_vocabulary_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.

level

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

location

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.

location_id
objects = <django.db.models.manager.Manager object>
project_relation = 'locations__administratives__in'
vocabulary

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.Benchmark(id, project, category, name, value)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

category

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.

category_id
id

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

name

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.

name_id
objects = <django.db.models.manager.Manager object>
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
value

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.Benchmarkname(id, name, order)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

benchmark_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 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.

category_set

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

id

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.

class akvo.rsr.models.BudgetItem(id, project, label, other_extra, amount, type, period_start, period_end, value_date, currency, status)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

OTHER_LABELS = ['other 1', 'other 2', 'other 3']
amount

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

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.

currency

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

get_currency()[source]
get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
get_label()[source]

Needed since we have to have a vanilla __str__() method for the admin

get_status_display(*, field=<akvo.rsr.fields.ValidXMLCharField: status>)
get_type_display(*, field=<akvo.rsr.fields.ValidXMLCharField: type>)
iati_currency()[source]
iati_currency_unicode()[source]
iati_status()[source]
iati_status_unicode()[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.

label

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.

label_id
objects = <django.db.models.manager.Manager object>
other_extra

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

period_end

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

period_start

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

project_id
status

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_date

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.BudgetItemLabel(id, label)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

TOTAL_BUDGET_LABEL_ID = 14
budgetitem_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 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.

id

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

label

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>
class akvo.rsr.models.Category(id, name)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

benchmark_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 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.

benchmarknames

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

category_benchmarks_html()[source]
focus_area

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

focus_areas()[source]
focus_areas_html()[source]
id

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>
projects

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

class akvo.rsr.models.Country(id, name, iso_code, continent, continent_code)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

contacts

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.

continent

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

continent_code

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

classmethod fields_from_iso_code(iso_code)[source]
get_continent_code_display(*, field=<akvo.rsr.fields.ValidXMLCharField: continent_code>)
get_iso_code_display(*, field=<akvo.rsr.fields.ValidXMLCharField: iso_code>)
id

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

iso_code

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>
organisationlocation_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 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.

projectlocation_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 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.

projectupdatelocation_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 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.

class akvo.rsr.models.CountryBudgetItem(id, project, code, description, percentage)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

code

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

description

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

get_code_display(*, field=<akvo.rsr.fields.ValidXMLCharField: code>)
iati_code()[source]
iati_code_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.

objects = <django.db.models.manager.Manager object>
percentage

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

project_id
class akvo.rsr.models.CrsAdd(*args, **kwargs)[source]

Bases: Model

Items specific to CRS++ reporting. Can only occur once per project.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

channel_code

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

commitment_date

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

get_channel_code_display(*, field=<akvo.rsr.fields.ValidXMLCharField: channel_code>)
get_loan_status_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: loan_status_currency>)
get_repayment_plan_display(*, field=<akvo.rsr.fields.ValidXMLCharField: repayment_plan>)
get_repayment_type_display(*, field=<akvo.rsr.fields.ValidXMLCharField: repayment_type>)
iati_channel_code()[source]
iati_channel_code_unicode()[source]
iati_currency()[source]
iati_currency_unicode()[source]
iati_repayment_plan()[source]
iati_repayment_plan_unicode()[source]
iati_repayment_type()[source]
iati_repayment_type_unicode()[source]
interest_arrears

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

interest_received

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

loan_status_currency

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

loan_status_value_date

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

loan_status_year

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

loan_terms_rate1

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

loan_terms_rate2

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>
other_flags

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.

principal_arrears

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

principal_outstanding

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 one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

project_id
repayment_final_date

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

repayment_first_date

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

repayment_plan

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

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

Bases: Model

Other flag of CRS++ reporting.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

code

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

crs

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.

crs_id
get_code_display(*, field=<akvo.rsr.fields.ValidXMLCharField: code>)
iati_code()[source]
iati_code_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.

objects = <django.db.models.manager.Manager object>
significance

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.DefaultPeriod(id, project, parent, period_start, period_end)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

child_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 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.

id

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>
parent

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_id
period_end

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

period_start

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

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

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

class akvo.rsr.models.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.

class akvo.rsr.models.DisaggregationContribution(*args, **kwargs)[source]

Bases: TimestampsMixin, IndicatorUpdateMixin, Model

Model to hold the disaggragation contribution

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

contributing_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.

contributing_project_id
created_at

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

denominator

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

disaggregation

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.

disaggregation_id
id

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.

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>
value

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.DisaggregationTarget(id, period, dimension_value, value)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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
id

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>
period

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.

period_id
project_relation = 'results__indicators__periods__disaggregation_targets__in'
value

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.Employment(id, organisation, user, group, is_approved, receives_indicator_aggregation_emails, country, job_title)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

approve(approved_by)[source]

Approve an Employment. Will also be logged in the Employment admin history.

Parameters:

approved_by – User that approves the Employment

country

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

get_country_display(*, field=<akvo.rsr.fields.ValidXMLCharField: country>)
group

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.

group_id
iati_country()[source]
iati_country_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.

is_approved

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

job_title

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

organisation_id
receives_indicator_aggregation_emails

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

to_dict(org_list)[source]
user

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.

user_id
class akvo.rsr.models.ExternalProject(id, created_at, last_modified_at, related_project, iati_id, cofunded)[source]

Bases: TimestampsMixin

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

cofunded

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

created_at

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

iati_id

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.

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.

objects = <django.db.models.manager.Manager object>
related_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.

related_project_id
class akvo.rsr.models.FocusArea(id, name, slug, description, image, link_to)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

cacheable_url
categories

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

description

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

get_absolute_url()[source]
id

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

image

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

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

return all projects that “belong” to the FA through the Categories it links to

slug

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

Bases: Model

Items specific to OECD DAC Forward Spending Survey. Can only occur once per project.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

extraction_date

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

forecasts

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.

objects = <django.db.models.manager.Manager object>
phaseout_year

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

priority

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 one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

project_id
class akvo.rsr.models.FssForecast(*args, **kwargs)[source]

Bases: Model

Forecast items for an OECD DAC Forward Spending Survey item.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

currency

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

fss

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.

fss_id
get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
iati_currency()[source]
iati_currency_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.

objects = <django.db.models.manager.Manager object>
value

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

value_date

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

year

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.Goal(id, project, text)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

id

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>
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
text

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.HumanitarianScope(id, project, code, type, vocabulary, vocabulary_uri, text)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

code

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>)
get_vocabulary_display(*, field=<akvo.rsr.fields.ValidXMLCharField: vocabulary>)
iati_type()[source]
iati_type_unicode()[source]
iati_vocabulary()[source]
iati_vocabulary_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.

objects = <django.db.models.manager.Manager object>
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
text

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.

vocabulary

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

vocabulary_uri

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

Bases: TimestampsMixin

The IatiActivityExport tracks the export of one IATI activity. Each project exported by an IATI export will have a IatiActivityExport record.

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.

iati_export

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.

iati_export_id
id

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.

objects = <django.db.models.manager.Manager object>
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
show_status()[source]
status

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.IatiActivityValidationJob(id, scheduled_at, started_at, finished_at, attempts, project)[source]

Bases: IatiValidationJobMixin

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

attempts

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

finished_at

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

get_next_by_scheduled_at(*, field=<django.db.models.fields.DateTimeField: scheduled_at>, is_next=True, **kwargs)
get_previous_by_scheduled_at(*, field=<django.db.models.fields.DateTimeField: scheduled_at>, is_next=False, **kwargs)
id

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>
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
scheduled_at

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

started_at

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.IatiCheck(id, project, status, description)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

description

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.

objects = <django.db.models.manager.Manager object>
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
show_status()[source]
status

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.IatiExport(id, created_at, last_modified_at, reporting_organisation, user, version, status, iati_file, latest)[source]

Bases: TimestampsMixin

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

STATUS_CANCELLED = 4
STATUS_CODE = {1: 'pending', 2: 'in progress', 3: 'completed', 4: 'cancelled'}
STATUS_COMPLETED = 3
STATUS_IN_PROGRESS = 2
STATUS_PENDING = 1
create_iati_file()[source]

Create an IATI XML file.

created_at

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

iati_activity_exports

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.

iati_file

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)
id

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

property is_latest
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.

latest

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

Find the number of processed projects of this IATI export. Generally, for completed exports, this number will be the same as the number of total projects.

projects

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

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

reporting_organisation_id
show_status()[source]
status

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

update_iati_file(iati_file)[source]

Update the IATI file of this IATI export.

:param iati_file; File object

update_status(status_code)[source]

Update the status of this IATI export.

:param status_code; Integer in self.STATUS_CODE keys

user

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.

user_id
version

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.IatiOrganisationValidationJob(id, scheduled_at, started_at, finished_at, attempts, organisation)[source]

Bases: IatiValidationJobMixin

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

attempts

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

finished_at

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

get_next_by_scheduled_at(*, field=<django.db.models.fields.DateTimeField: scheduled_at>, is_next=True, **kwargs)
get_previous_by_scheduled_at(*, field=<django.db.models.fields.DateTimeField: scheduled_at>, is_next=False, **kwargs)
id

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

organisation_id
scheduled_at

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

started_at

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.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 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.

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 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.

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.

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 and Topping.pizzas are ManyToManyDescriptor 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 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.

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 and Topping.pizzas are ManyToManyDescriptor 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>)
iati_measure()[source]
iati_measure_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.

is_calculated()[source]
is_child_indicator()[source]

Indicates whether this indicator is linked to a parent indicator.

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.

is_parent_indicator()[source]

Indicates whether this indicator has children.

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 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.

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

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 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.

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 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.

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.

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.

class akvo.rsr.models.IndicatorCustomField(id, project, name, order, mandatory, help_text, type, dropdown_options)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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_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.

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

project_id
type

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

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 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.

class akvo.rsr.models.IndicatorCustomValue(id, indicator, custom_field, text_value, boolean_value, dropdown_selection)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

boolean_value

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

custom_field

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.

custom_field_id
dropdown_selection

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.

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

indicator_id
objects = <django.db.models.manager.Manager object>
project_relation = 'results__indicators__custom_values__in'
text_value

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.IndicatorDimensionName(id, project, name, parent_dimension_name)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

child_dimension_names

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.

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

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 forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

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

name

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

name_and_values()[source]
objects = <django.db.models.manager.Manager object>
parent_dimension_name

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_dimension_name_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]

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.

class akvo.rsr.models.IndicatorDimensionValue(id, name, value, parent_dimension_value)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

child_dimension_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 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.

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

disaggregations

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.

id

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

indicator_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 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.

name

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.

name_id
objects = <django.db.models.manager.Manager object>
parent_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.

parent_dimension_value_id
period_disaggregations

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.

project_relation = 'dimension_names__dimension_values__in'
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.

value

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.IndicatorDisaggregationTarget(id, indicator, dimension_value, value)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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
id

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

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

indicator_id
objects = <django.db.models.manager.Manager object>
project_relation = 'results__indicators__disaggregation_targets__in'
value

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.IndicatorLabel(id, indicator, label)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

id

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

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

indicator_id
label

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.

label_id
objects = <django.db.models.manager.Manager object>
project_relation = 'results__indicators__labels__in'
class akvo.rsr.models.IndicatorPeriod(id, indicator, parent_period, locked, period_start, period_end, target_value, target_comment, target_score, actual_value, actual_comment, numerator, denominator, narrative, score_index, score_indices, label)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

actual_comment

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

actual_locations

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.

actual_value

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

actual_value_is_decimal()[source]
adjacent_period(next_period=True)[source]

Returns the next or previous indicator period, if we can find one with a start date, and we have a start date ourselves.

:param next_period; Boolean indicating either the next (True) or previous (False) period.

aggregation_jobs

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.

property approved_updates
can_save_update(update_id=None)[source]

Return True if an update can be created/updated on the indicator period.

If no update_id is passed, we check if a new update can be created. If an update_id is passed, we verify that the update can be modified.

Non percentage indicators can have multiple updates. If the indicator is a percentage indicator, we check that no other update is present, other than the one currently being created or changed.

child_aggregation_jobs

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.

child_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 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.

data

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.

denominator

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

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 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.

disaggregations

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.

get_root_period()[source]
id

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

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

indicator_id
is_calculated()[source]

When a period has got indicator updates, we consider the actual value to be a ‘calculated’ value, meaning that it’s not possible to update the actual value directly. Only through indicator updates.

is_child_period()[source]

Indicates whether this period is linked to a parent period

label

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.

label_id
locked

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>
parent_period

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_period_id
property percent_accomplishment

Return the percentage completed for this indicator period. If not possible to convert the values to numbers, return None.

property percent_accomplishment_100

Similar to the percent_accomplishment property. However, it won’t return any number bigger than 100.

period_end

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

period_start

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

periodactualvalue_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 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.

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 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.

property project
project_relation = 'results__indicators__periods__in'
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.

score_index

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

score_indices

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_locations

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.

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.

update_actual_comment(save=True)[source]

Set the actual comment to the text of the latest approved update.

:param save; Boolean, save period if True :return Actual comment of period

update_score(save=True)[source]

Set the score of the period to the score of the latest approved update.

class akvo.rsr.models.IndicatorPeriodActualLocation(id, period, location)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

id

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

location

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>
period

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.

period_id
project_relation = 'results__indicators__periods__actual_locations__in'
class akvo.rsr.models.IndicatorPeriodAggregationJob(id, status, attempts, pid, updated_at, period, root_period)[source]

Bases: CronJobMixin

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

attempts

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

get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)
get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

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>
period

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.

period_id
pid

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

property project
project_relation = 'period__indicator__result__project__'
root_period

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.

root_period_id
property root_project
status

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

updated_at

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

Bases: TimestampsMixin, IndicatorUpdateMixin, Model

Model for adding data to an indicator period.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

STATUSES = [('D', 'draft'), ('P', 'pending approval'), ('R', 'return for revision'), ('A', 'approved')]
STATUSES_LABELS_LIST = ['draft', 'pending approval', 'return for revision', 'approved']
STATUS_APPROVED = 'approved'
STATUS_APPROVED_CODE = 'A'
STATUS_CODES_LIST = ['D', 'P', 'R', 'A']
STATUS_DRAFT = 'draft'
STATUS_DRAFT_CODE = 'D'
STATUS_PENDING = 'pending approval'
STATUS_PENDING_CODE = 'P'
STATUS_REVISION = 'return for revision'
STATUS_REVISION_CODE = 'R'
UPDATE_METHODS = (('W', 'web'), ('M', 'mobile'))
approved_by

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.

approved_by_id
clean()[source]

Perform several checks before we can actually save the update data.

comments

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.

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.

disaggregations

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.

file

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)
property file_url

Returns the full URL of the file.

get_status_display(*, field=<akvo.rsr.fields.ValidXMLCharField: status>)
get_update_method_display(*, field=<akvo.rsr.fields.ValidXMLCharField: update_method>)
classmethod get_user_viewable_updates(queryset, user)[source]
id

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

indicatorperioddatafile_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 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.

indicatorperioddataphoto_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 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.

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>
period

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.

period_id
photo

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

property photo_url

Returns the full URL of the photo.

project_relation = 'results__indicators__periods__data__in'
review_note

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

save(recalculate=True, *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.

score_index

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

score_indices

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

status

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

property status_display

Returns the display of the status.

text

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

update_method

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

user

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.

user_id
value

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

Bases: TimestampsMixin

Model for adding comments to data of an indicator period.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

comment

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

created_at

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

data

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.

data_id
id

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.

objects = <django.db.models.manager.Manager object>
project_relation = 'results__indicators__periods__data__comments__in'
user

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.

user_id
class akvo.rsr.models.IndicatorPeriodDataFile(id, update, file)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

file

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)
id

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>
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
class akvo.rsr.models.IndicatorPeriodDataPhoto(id, update, photo)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

id

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>
photo

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

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
class akvo.rsr.models.IndicatorPeriodDisaggregation(*args, **kwargs)[source]

Bases: TimestampsMixin, IndicatorUpdateMixin, Model

Model to hold aggregated disaggregation updates

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

contributors

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.

created_at

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

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
id

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.

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>
period

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.

period_id
project_relation = 'results__indicators__periods__disaggregations__in'
value

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

Bases: Model

Model for adding a label on an indicator period.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

id

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

label

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>
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 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.

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
project_relation = ''
class akvo.rsr.models.IndicatorPeriodTargetLocation(id, period, location)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

id

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

location

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>
period

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.

period_id
project_relation = 'results__indicators__periods__target_locations__in'
class akvo.rsr.models.IndicatorReference(id, indicator, reference, vocabulary, vocabulary_uri)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

get_vocabulary_display(*, field=<akvo.rsr.fields.ValidXMLCharField: vocabulary>)
iati_vocabulary()[source]
iati_vocabulary_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.

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

indicator_id
objects = <django.db.models.manager.Manager object>
project_relation = 'results__indicators__references__in'
reference

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

vocabulary

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

vocabulary_uri

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

Bases: Model

Model allowing organisations to record their internal references to other organisations.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

id

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

identifier

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>
recording_org

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.

recording_org_id
referenced_org

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.

referenced_org_id
class akvo.rsr.models.Keyword(id, label, logo)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

id

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

label

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

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

objects = <django.db.models.manager.Manager object>
partnersites

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

projects

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

class akvo.rsr.models.LegacyData(id, project, name, value, iati_equivalent)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

iati_equivalent

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.

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>
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
value

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

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

caption

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

get_kind_display(*, field=<akvo.rsr.fields.ValidXMLCharField: kind>)
id

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

kind

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>
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
url

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

Bases: TimestampsMixin

Model to log login attempts of users.

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.

email

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.

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.

objects = <django.db.models.manager.Manager object>
success

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.NarrativeReport(id, project, category, text, published, period_start, period_end)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

category

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.

category_id
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.

get_next_by_period_end(*, field=<django.db.models.fields.DateField: period_end>, is_next=True, **kwargs)
get_next_by_period_start(*, field=<django.db.models.fields.DateField: period_start>, is_next=True, **kwargs)
get_previous_by_period_end(*, field=<django.db.models.fields.DateField: period_end>, is_next=False, **kwargs)
get_previous_by_period_start(*, field=<django.db.models.fields.DateField: period_start>, is_next=False, **kwargs)
id

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>
period_end

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

period_start

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

project_id
published

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

text

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

Bases: TimestampsMixin

There are four types of organisations in RSR, called Field, Support, Funding and Sponsor partner respectively.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

NEW_TO_OLD_TYPES = ['G', 'G', 'N', 'N', 'N', 'N', 'N', 'N', 'C', 'K']
active_projects()[source]
all_projects()[source]

returns a queryset with all projects that has self as any kind of partner.

all_updates()[source]

Returns a queryset with all updates of the organisation.

Updates of the organisation are updates which have been:

  1. Posted by users employed by the organisation AND

  2. Posted on projects where the organisation is a partner.

static all_updates_filter(org_id)[source]

Returns a Q object for filtering updates for an organisation.

all_users()[source]

returns a queryset of all users belonging to the organisation

amount_pledged()[source]

How much the organisation has pledged to projects in default currency

cacheable_url
can_become_reporting

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

can_create_projects

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

property canonical_name
clean()[source]

Organisations can only be saved when we’re sure that they do not exist already.

codelist

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.

codelist_id
contact_email

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

contact_person

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

content_owned_by()[source]

Returns a list of Organisations of which this organisation is content owned by. Basically the reverse of content_owned_organisations(). Includes self.

content_owned_organisations(exclude_orgs=None)[source]

Returns a list of Organisations of which this organisation is the content owner. Includes self and is recursive.

content_owner

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.

content_owner_id
countries_where_active()[source]

Returns a Country queryset of countries where this organisation has published projects.

created_at

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

currency

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

currency_label()[source]
custom_fields

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.

description

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

documents

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.

employees

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.

enforce_2fa

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

enforce_program_projects

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

facebook

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

fax

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

field_partners()[source]

Returns an Organisation queryset of field partners of which self has at least one project in common with.

get_absolute_url()[source]
get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
get_language_display(*, field=<akvo.rsr.fields.ValidXMLCharField: language>)
get_new_organisation_type_display(*, field=<django.db.models.fields.IntegerField: new_organisation_type>)
get_organisation_type_display(*, field=<akvo.rsr.fields.ValidXMLCharField: organisation_type>)
get_original()[source]

Returns the original org if self is a shadow org

has_multiple_project_currencies()[source]

Check if organisation has projects with different currencies

has_partner_types(project)[source]

Return a list of partner types of this organisation to the project

iati_exports

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.

iati_file()[source]

Looks up the latest public IATI file of this organisation.

Returns:

String of IATI file or None

iati_file_unicode()[source]
iati_org_id

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

iati_org_type()[source]
iati_org_type_unicode()[source]
iati_prefixes

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

iatiorganisationvalidationjob_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 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.

id

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

indicator_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 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.

internal_ids

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.

internal_org_ids

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

language

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.

linkedin

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

locations

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.

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

long_name

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

mobile

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.

new_organisation_type

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

notes

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.OrganisationManagerFromOrganisationQuerySet object>
org_currency_funds_needed()[source]

How much is still needed to fully fund all projects with default currency budget that the organisation is a partner to.

The ORM aggregate() doesn’t work here since we may have multiple partnership relations to the same project.

org_currency_projects_count()[source]

How many projects with budget in default currency the organisation is a partner to

classmethod org_type_from_iati_type(iati_type)[source]

utility that maps the IATI organisation types to the old Akvo organisation types

organisation_countries()[source]

Returns a list of the organisations countries.

organisation_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 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.

organisation_type

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

organisationaccount

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

original

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

original_id
partners()[source]

Returns a queryset of all organisations that self has at least one project in common with, excluding self.

partnerships

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.

partnersite_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 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.

partnersites()[source]

returns the partnersites belonging to the organisation in a PartnerSite queryset

password_policy

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.

password_policy_id
phone

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

primary_location

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.

primary_location_id
project_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 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.

projects

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

providing_disbursements

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.

providing_transactions

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.

public_iati_file

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

public_updates()[source]

Returns a queryset with public updates of the organisation.

published_projects(only_public=True)[source]

returns a queryset with published projects that has self as any kind of partner

receiver_org_budgets

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.

receiving_disbursements

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.

receiving_transactions

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.

recipient_country_budgets

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.

recipient_org_budgets

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.

recipient_region_budgets

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.

recording_organisation

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

reference_ids

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.

report_set

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

reporting_on_projects()[source]

returns a queryset with all projects that has self as reporting organisation.

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.

shadow

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

support_partners()[source]

Returns a queryset of support partners that self has at least one project in common with, excluding self.

total_budgets

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.

total_expenditures

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.

twitter

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

url

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

use_project_roles

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

users

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

website()[source]
class akvo.rsr.models.OrganisationAccount(*args, **kwargs)[source]

Bases: Model

This model keeps track of organisation account levels and other relevant data. The reason for having this in a separate model form Organisation is to hide it from the org admins.

ACCOUNT_FREE = 'archived'
ACCOUNT_FREEMIUM = 'freemium'
ACCOUNT_LEVEL = (('archived', 'Free'), ('freemium', 'Freemium'), ('premium', 'Premium'), ('plus', 'Premium Plus'), ('archived', 'Archived'))
ACCOUNT_PLUS = 'plus'
ACCOUNT_PREMIUM = 'premium'
exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

account_level

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

get_account_level_display(*, field=<akvo.rsr.fields.ValidXMLCharField: account_level>)
objects = <django.db.models.manager.Manager object>
organisation

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

organisation_id
class akvo.rsr.models.OrganisationCodelist(id, slug, data)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

data

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.

objects = <django.db.models.manager.Manager object>
organisation_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 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.

slug

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.OrganisationCountryBudget(id, currency, value, value_date, period_start, period_end, status, organisation, country, text)[source]

Bases: OrganisationBudget

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

budget_lines

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.

country

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

currency

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

get_country_display(*, field=<akvo.rsr.fields.ValidXMLCharField: country>)
get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
get_status_display(*, field=<akvo.rsr.fields.ValidXMLCharField: status>)
iati_country()[source]
iati_country_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.

objects = <django.db.models.manager.Manager object>
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 a ForwardManyToOneDescriptor instance.

organisation_id
period_end

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

period_start

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

status

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

text

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.

value_date

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.OrganisationCountryBudgetLine(id, currency, value, value_date, reference, text, budget)[source]

Bases: LineBasic

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

budget

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.

budget_id
currency

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

get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
id

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>
reference

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

text

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.

value_date

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.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.

new_project_custom_field(project_id)[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.

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

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.OrganisationDocument(id, organisation, url, document, format, title, title_language, language, document_date)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

categories

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.

countries

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.

document

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)
document_date

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

format

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

get_format_display(*, field=<akvo.rsr.fields.ValidXMLCharField: format>)
get_language_display(*, field=<akvo.rsr.fields.ValidXMLCharField: language>)
get_title_language_display(*, field=<akvo.rsr.fields.ValidXMLCharField: title_language>)
iati_language()[source]
iati_language_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.

language

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

organisation_id
title

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

title_language

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

url

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.OrganisationDocumentCategory(id, document, category)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

category

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

document

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.

document_id
get_category_display(*, field=<akvo.rsr.fields.ValidXMLCharField: category>)
iati_category()[source]
iati_category_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.

objects = <django.db.models.manager.Manager object>
class akvo.rsr.models.OrganisationDocumentCountry(id, document, country, text)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

country

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

document

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.

document_id
get_country_display(*, field=<akvo.rsr.fields.ValidXMLCharField: country>)
iati_country()[source]
iati_country_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.

objects = <django.db.models.manager.Manager object>
text

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.OrganisationExpenseLine(id, currency, value, value_date, reference, text, expenditure)[source]

Bases: LineBasic

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

currency

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

expenditure

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.

expenditure_id
get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
id

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>
reference

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

text

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.

value_date

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.OrganisationIndicatorLabel(id, organisation, label)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

class Organisation(*args, **kwargs)

Bases: TimestampsMixin

There are four types of organisations in RSR, called Field, Support, Funding and Sponsor partner respectively.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

NEW_TO_OLD_TYPES = ['G', 'G', 'N', 'N', 'N', 'N', 'N', 'N', 'C', 'K']
active_projects()
all_projects()

returns a queryset with all projects that has self as any kind of partner.

all_updates()

Returns a queryset with all updates of the organisation.

Updates of the organisation are updates which have been:

  1. Posted by users employed by the organisation AND

  2. Posted on projects where the organisation is a partner.

static all_updates_filter(org_id)

Returns a Q object for filtering updates for an organisation.

all_users()

returns a queryset of all users belonging to the organisation

amount_pledged()

How much the organisation has pledged to projects in default currency

cacheable_url
can_become_reporting

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

can_create_projects

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

property canonical_name
clean()

Organisations can only be saved when we’re sure that they do not exist already.

codelist

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.

codelist_id
contact_email

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

contact_person

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

content_owned_by()

Returns a list of Organisations of which this organisation is content owned by. Basically the reverse of content_owned_organisations(). Includes self.

content_owned_organisations(exclude_orgs=None)

Returns a list of Organisations of which this organisation is the content owner. Includes self and is recursive.

content_owner

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.

content_owner_id
countries_where_active()

Returns a Country queryset of countries where this organisation has published projects.

created_at

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

currency

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

currency_label()
custom_fields

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.

description

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

documents

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.

employees

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.

enforce_2fa

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

enforce_program_projects

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

facebook

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

fax

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

field_partners()

Returns an Organisation queryset of field partners of which self has at least one project in common with.

get_absolute_url()
get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
get_language_display(*, field=<akvo.rsr.fields.ValidXMLCharField: language>)
get_new_organisation_type_display(*, field=<django.db.models.fields.IntegerField: new_organisation_type>)
get_organisation_type_display(*, field=<akvo.rsr.fields.ValidXMLCharField: organisation_type>)
get_original()

Returns the original org if self is a shadow org

has_multiple_project_currencies()

Check if organisation has projects with different currencies

has_partner_types(project)

Return a list of partner types of this organisation to the project

iati_exports

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.

iati_file()

Looks up the latest public IATI file of this organisation.

Returns:

String of IATI file or None

iati_file_unicode()
iati_org_id

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

iati_org_type()
iati_org_type_unicode()
iati_prefixes

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

iatiorganisationvalidationjob_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 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.

id

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

indicator_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 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.

internal_ids

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.

internal_org_ids

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

language

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.

linkedin

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

locations

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.

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

long_name

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

mobile

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.

new_organisation_type

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

notes

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.OrganisationManagerFromOrganisationQuerySet object>
org_currency_funds_needed()

How much is still needed to fully fund all projects with default currency budget that the organisation is a partner to.

The ORM aggregate() doesn’t work here since we may have multiple partnership relations to the same project.

org_currency_projects_count()

How many projects with budget in default currency the organisation is a partner to

classmethod org_type_from_iati_type(iati_type)

utility that maps the IATI organisation types to the old Akvo organisation types

organisation_countries()

Returns a list of the organisations countries.

organisation_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 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.

organisation_type

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

organisationaccount

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

original

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

original_id
partners()

Returns a queryset of all organisations that self has at least one project in common with, excluding self.

partnerships

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.

partnersite_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 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.

partnersites()

returns the partnersites belonging to the organisation in a PartnerSite queryset

password_policy

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.

password_policy_id
phone

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

primary_location

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.

primary_location_id
project_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 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.

projects

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

providing_disbursements

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.

providing_transactions

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.

public_iati_file

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

public_updates()

Returns a queryset with public updates of the organisation.

published_projects(only_public=True)

returns a queryset with published projects that has self as any kind of partner

receiver_org_budgets

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.

receiving_disbursements

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.

receiving_transactions

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.

recipient_country_budgets

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.

recipient_org_budgets

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.

recipient_region_budgets

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.

recording_organisation

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

reference_ids

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.

report_set

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

reporting_on_projects()

returns a queryset with all projects that has self as reporting organisation.

save(*args, **kwargs)

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.

shadow

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

support_partners()

Returns a queryset of support partners that self has at least one project in common with, excluding self.

total_budgets

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.

total_expenditures

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.

twitter

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

url

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

use_project_roles

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

users

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

website()
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.

label

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

narrative_reports

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.

objects = <django.db.models.manager.Manager object>
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 a ForwardManyToOneDescriptor instance.

organisation_id
class akvo.rsr.models.OrganisationLocation(id, latitude, longitude, city, state, address_1, address_2, postcode, country, location_target, iati_country)[source]

Bases: BaseLocation

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

address_1

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

address_2

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

city

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

country

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.

country_id
get_iati_country_display(*, field=<akvo.rsr.fields.ValidXMLCharField: iati_country>)
iati_country

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

iati_country_value()[source]
iati_country_value_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.

latitude

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

location_target

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.

location_target_id
longitude

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>
organisation_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 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.

postcode

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

state

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.OrganisationRecipientOrgBudget(id, currency, value, value_date, period_start, period_end, status, organisation, recipient_organisation)[source]

Bases: OrganisationBudget

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

budget_lines

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.

currency

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

get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
get_status_display(*, field=<akvo.rsr.fields.ValidXMLCharField: status>)
id

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

organisation_id
period_end

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

period_start

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

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

recipient_organisation_id
status

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.

value_date

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.OrganisationRecipientOrgBudgetLine(id, currency, value, value_date, reference, text, budget)[source]

Bases: LineBasic

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

budget

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.

budget_id
currency

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

get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
id

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>
reference

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

text

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.

value_date

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.OrganisationRegionBudget(id, currency, value, value_date, period_start, period_end, status, organisation, region, region_vocabulary, region_vocabulary_uri, text)[source]

Bases: OrganisationBudget

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

budget_lines

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.

currency

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

get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
get_region_display(*, field=<akvo.rsr.fields.ValidXMLCharField: region>)
get_region_vocabulary_display(*, field=<akvo.rsr.fields.ValidXMLCharField: region_vocabulary>)
get_status_display(*, field=<akvo.rsr.fields.ValidXMLCharField: status>)
iati_region()[source]
iati_region_unicode()[source]
iati_region_vocabulary()[source]
iati_region_vocabulary_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.

objects = <django.db.models.manager.Manager object>
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 a ForwardManyToOneDescriptor instance.

organisation_id
period_end

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

period_start

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

region

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

region_vocabulary

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

region_vocabulary_uri

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

status

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

text

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.

value_date

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.OrganisationRegionBudgetLine(id, currency, value, value_date, reference, text, budget)[source]

Bases: LineBasic

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

budget

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.

budget_id
currency

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

get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
id

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>
reference

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

text

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.

value_date

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.OrganisationTotalBudget(id, currency, value, value_date, period_start, period_end, status, organisation)[source]

Bases: OrganisationBudget

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

budget_lines

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.

currency

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

get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
get_status_display(*, field=<akvo.rsr.fields.ValidXMLCharField: status>)
id

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

organisation_id
period_end

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

period_start

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

status

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.

value_date

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.OrganisationTotalBudgetLine(id, currency, value, value_date, reference, text, budget)[source]

Bases: LineBasic

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

budget

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.

budget_id
currency

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

get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
id

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>
reference

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

text

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.

value_date

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.OrganisationTotalExpenditure(id, currency, value, value_date, period_start, period_end, organisation)[source]

Bases: OrganisationFinanceBasic

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

currency

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

expense_lines

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.

get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
id

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

organisation_id
period_end

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

period_start

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.

value_date

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

Bases: TimestampsMixin

Model makes it possible to cater different data sets based on request’s hostname.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

about_box

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

about_image

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

all_maps

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

all_projects()[source]

All projects of the Page

apply_keywords(projects)[source]

Apply keywords to the Page’s projects.

cname

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

created_at

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

custom_css

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)
custom_favicon

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)
custom_map_marker

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)
custom_return_url

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

custom_return_url_text

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

default_language

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

enabled

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

exclude_keywords

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

facebook_app_id

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

facebook_button

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

property favicon

Return favicon.

property full_domain

Return full domain.

get_absolute_url()[source]

Return absolute url.

get_default_language_display(*, field=<akvo.rsr.fields.ValidXMLCharField: default_language>)
google_translation

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

hostname

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.

is_cname_request(netloc)[source]
keywords

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

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.

Return logo.

property map_marker

Return full path to map marker if it exists.

notes

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

organisation_id
partner_projects

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

partners()[source]

All partner organisations of all projects of the Page

password

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

piwik_id

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

program

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.

program_id
projects()[source]

Publicly published projects of the page.

redirect_cname

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

property return_url

Return custom url or /.

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.

show_keyword_logos

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

show_keywords()[source]

Return keywords for PartnerSite.

property show_private_projects

Show private projects if a password has been set.

property stylesheet

Return stylesheet.

tagline

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

twitter_button

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

ui_translation

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

updates()[source]

All updates of all projects of the Page

classmethod yank_hostname(netloc)[source]

Get <partner1> from <partner1.akvoapp.org>.

From a netloc return what is stored as “hostname” on the PartnerSite model.

class akvo.rsr.models.Partnership(id, organisation, project, iati_organisation_role, is_secondary_reporter, funding_amount, partner_type_extra, iati_activity_id, internal_id, iati_url, related_activity_id)[source]

Bases: Model

AKVO_SPONSOR_PARTNER = 100
ALLIANCE_PARTNER = 'alliance'
exception DoesNotExist

Bases: ObjectDoesNotExist

EXTENDING_PARTNER = 'extending'
FIELD_PARTNER = 'field'
FUNDING_PARTNER = 'funding'
IATI_ACCOUNTABLE_PARTNER = 2
IATI_EXTENDING_PARTNER = 3
IATI_FUNDING_PARTNER = 1
IATI_IMPLEMENTING_PARTNER = 4
IATI_REPORTING_ORGANISATION = 101
IATI_ROLES = [(1, 'Funding partner'), (2, 'Accountable partner'), (3, 'Extending partner'), (4, 'Implementing partner'), (100, 'Sponsor partner'), (101, 'Reporting organisation')]
IATI_ROLE_LABELS = ['Funding partner', 'Accountable partner', 'Extending partner', 'Implementing partner', 'Sponsor partner', 'Reporting organisation']
IATI_ROLE_LIST = [1, 2, 3, 4, 100, 101]
KNOWLEDGE_PARTNER = 'knowledge'
exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

NETWORK_PARTNER = 'network'
PARTNER_LABELS = ['Implementing partner', 'Funding partner', 'Sponsor partner', 'Accountable partner', 'Extending partner']
PARTNER_TYPES = [('field', 'Implementing partner'), ('funding', 'Funding partner'), ('sponsor', 'Sponsor partner'), ('support', 'Accountable partner'), ('extending', 'Extending partner')]
PARTNER_TYPES_TO_ROLES_MAP = {'field': 4, 'funding': 1, 'sponsor': 100, 'support': 2}
PARTNER_TYPE_EXTRAS = [('alliance', 'Alliance'), ('knowledge', 'Knowledge'), ('network', 'Network')]
PARTNER_TYPE_EXTRAS_LIST = ('alliance', 'knowledge', 'network')
PARTNER_TYPE_EXTRA_LABELS = ('Alliance', 'Knowledge', 'Network')
PARTNER_TYPE_LIST = ['field', 'funding', 'sponsor', 'support', 'extending']
ROLES_TO_PARTNER_TYPES_MAP = {1: 'funding', 2: 'support', 3: 'extending', 4: 'field', 100: 'sponsor', 101: ''}
SPONSOR_PARTNER = 'sponsor'
SUPPORT_PARTNER = 'support'
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]
funding_amount

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

funding_amount_with_currency()[source]

Returns the funding amount, prepended by the project’s currency.

get_iati_organisation_role_display(*, field=<django.db.models.fields.PositiveSmallIntegerField: iati_organisation_role>)
get_partner_type_extra_display(*, field=<akvo.rsr.fields.ValidXMLCharField: partner_type_extra>)
iati_activity_id

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

iati_organisation_role

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

iati_organisation_role_label()[source]
iati_organisation_role_label_unicode()[source]
iati_role_to_partner_type()[source]
iati_role_to_partner_type_unicode()[source]
iati_url

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.

internal_id

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

is_secondary_reporter

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

organisation_id
partner_type_extra

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

project_id
related_activity_id

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

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.

set_primary_organisation()[source]
class akvo.rsr.models.PeriodActualValue(id, period, measure, value, numerator, denominator)[source]

Bases: View

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

denominator

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.

measure

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>
period

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.

period_id
sql = '\n    SELECT\n        -- row_number() OVER... creates an artificial "pk" column, without which Django will protest\n        row_number() OVER (ORDER BY period.id) AS id,\n        period.id AS period_id,\n        indicator.measure as measure,\n        sum((update.value) :: DECIMAL(20,2)) AS value,\n        sum((update.numerator) :: DECIMAL(20,2)) AS numerator,\n        sum((update.denominator) :: DECIMAL(20,2)) AS denominator\n    FROM\n        rsr_indicatorperiod period,\n        rsr_indicator indicator,\n        rsr_indicatorperioddata update\n    WHERE\n        (\n            (((indicator.id = period.indicator_id) AND\n            (period.id = update.period_id)) AND\n            ((update.status) :: TEXT = \'A\' :: TEXT)) AND\n            ((update.value) :: TEXT ~ \'^\\d+\\.?\\d{0,2}$\' :: TEXT OR update.value IS NULL)\n        )\n    GROUP BY period.id, indicator.measure;\n'
value

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.PeriodDisaggregation(id, indicator, period, dimension_name, dimension_value, value, numerator, denominator)[source]

Bases: View

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

denominator

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

dimension_name

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

dimension_value

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.

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

indicator_id
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>
period

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.

period_id
sql = '\n    WITH aggregated_disaggs AS (\n        SELECT\n            update.period_id,\n            disagg.dimension_value_id,\n            sum((disagg.value) :: DECIMAL(20,2)) AS value,\n            sum((disagg.numerator) :: DECIMAL(20,2)) AS numerator,\n            sum((disagg.denominator) :: DECIMAL(20,2)) AS denominator\n        FROM\n            rsr_disaggregation disagg,\n            rsr_indicatorperioddata "update"\n        WHERE\n            update.status = \'A\' AND\n            disagg.update_id = update.id\n        GROUP BY\n            disagg.dimension_value_id, update.period_id\n    ),\n    period_disaggs AS (\n        SELECT DISTINCT\n            indicator.id AS indicator_id,\n            period.id AS period_id,\n            dimensionname.name AS dimension_name,\n            dimensionvalue.value AS dimension_value,\n            agg.value,\n            agg.numerator,\n            agg.denominator\n        FROM\n            rsr_indicator indicator,\n            rsr_indicatorperiod period,\n            rsr_indicator_dimension_names indicator_dimensions,\n            aggregated_disaggs agg,\n            rsr_indicatordimensionname dimensionname,\n            rsr_indicatordimensionvalue dimensionvalue\n        WHERE\n            indicator.id = period.indicator_id AND\n            period.id = agg.period_id AND\n            dimensionvalue.id = agg.dimension_value_id AND\n            dimensionname.id = dimensionvalue.name_id AND\n            indicator_dimensions.indicatordimensionname_id = dimensionname.id AND\n            indicator_dimensions.indicator_id = indicator.id\n    )\n    SELECT\n        row_number() OVER (ORDER BY indicator_id) AS id,\n        *\n    FROM period_disaggs\n'
value

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.PlannedDisbursement(id, project, value, value_date, currency, updated, period_start, period_end, type, provider_organisation, provider_organisation_activity, receiver_organisation, receiver_organisation_activity)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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.

currency

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

get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
get_type_display(*, field=<akvo.rsr.fields.ValidXMLCharField: type>)
iati_currency()[source]
iati_currency_unicode()[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.

objects = <django.db.models.manager.Manager object>
period_end

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

period_start

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

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

provider_organisation_activity

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

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

receiver_organisation_activity

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

receiver_organisation_id
type

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

updated

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.

value_date

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.PolicyMarker(id, project, policy_marker, significance, vocabulary, vocabulary_uri, description)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

description

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

get_policy_marker_display(*, field=<akvo.rsr.fields.ValidXMLCharField: policy_marker>)
get_significance_display(*, field=<akvo.rsr.fields.ValidXMLCharField: significance>)
get_vocabulary_display(*, field=<akvo.rsr.fields.ValidXMLCharField: vocabulary>)
iati_policy_marker()[source]
iati_policy_marker_unicode()[source]
iati_significance()[source]
iati_significance_unicode()[source]
iati_vocabulary()[source]
iati_vocabulary_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.

objects = <django.db.models.manager.Manager object>
policy_marker

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

project_id
significance

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

vocabulary

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

vocabulary_uri

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.Project(id, created_at, last_modified_at, path, uuid, title, subtitle, status, iati_status, project_plan_summary, current_image, current_image_caption, current_image_credit, goals_overview, current_status, project_plan, sustainability, background, target_group, descriptions_order, aggregate_children, aggregate_to_parent, is_impact_project, is_public, contributes_to_project, external_parent_iati_activity_id, language, notes, targets_at, currency, date_start_planned, date_start_actual, date_end_planned, date_end_actual, primary_location, primary_organisation, donate_url, donations, iati_activity_id, hierarchy, project_scope, capital_spend_percentage, collaboration_type, default_aid_type_vocabulary, default_aid_type, default_finance_type, default_flow_type, default_tied_status, country_budget_vocabulary, humanitarian, use_project_roles, run_iati_checks, budget, funds, funds_needed, last_update)[source]

Bases: TimestampsMixin, AkvoTreeModel

CODE_TO_STATUS = {'': 'N', '1': 'H', '2': 'A', '3': 'C', '4': 'C', '5': 'L', '6': 'C'}
CURRENCY_CHOICES = [('AED', 'AED - UAE Dirham'), ('AFN', 'AFN - Afghani'), ('ALL', 'ALL - Lek'), ('AMD', 'AMD - Armenian Dram'), ('ANG', 'ANG - Netherlands Antillian Guilder'), ('AOA', 'AOA - Kwanza'), ('ARS', 'ARS - Argentine Peso'), ('AUD', 'AUD - Australian Dollar'), ('AWG', 'AWG - Aruban Guilder'), ('AZN', 'AZN - Azerbaijanian Manat'), ('BAM', 'BAM - Convertible Marks'), ('BBD', 'BBD - Barbados Dollar'), ('BDT', 'BDT - Taka'), ('BGN', 'BGN - Bulgarian Lev'), ('BHD', 'BHD - Bahraini Dinar'), ('BIF', 'BIF - Burundi Franc'), ('BMD', 'BMD - Bermudian Dollar'), ('BND', 'BND - Brunei Dollar'), ('BOB', 'BOB - Boliviano'), ('BOV', 'BOV - Mvdol'), ('BRL', 'BRL - Brazilian Real'), ('BSD', 'BSD - Bahamian Dollar'), ('BTN', 'BTN - Ngultrum'), ('BWP', 'BWP - Pula'), ('BYR', 'BYR - Belarussian Ruble'), ('BYN', 'BYN - Belarussian Ruble'), ('BZD', 'BZD - Belize Dollar'), ('CAD', 'CAD - Canadian Dollar'), ('CDF', 'CDF - Congolese Franc'), ('CHF', 'CHF - Swiss Franc'), ('CLF', 'CLF - Unidades de fomento'), ('CLP', 'CLP - Chilean Peso'), ('CNY', 'CNY - Yuan Renminbi'), ('COP', 'COP - Colombian Peso'), ('COU', 'COU - Unidad de Valor Real'), ('CRC', 'CRC - Costa Rican Colon'), ('CUC', 'CUC - Peso Convertible'), ('CUP', 'CUP - Cuban Peso'), ('CVE', 'CVE - Cape Verde Escudo'), ('CZK', 'CZK - Czech Koruna'), ('DJF', 'DJF - Djibouti Franc'), ('DKK', 'DKK - Danish Krone'), ('DOP', 'DOP - Dominican Peso'), ('DZD', 'DZD - Algerian Dinar'), ('EEK', 'EEK - Kroon'), ('EGP', 'EGP - Egyptian Pound'), ('ERN', 'ERN - Nakfa'), ('ETB', 'ETB - Ethiopian Birr'), ('EUR', 'EUR - Euro'), ('FJD', 'FJD - Fiji Dollar'), ('FKP', 'FKP - Falkland Islands Pound'), ('GBP', 'GBP - Pound Sterling'), ('GEL', 'GEL - Lari'), ('GHS', 'GHS - Cedi'), ('GIP', 'GIP - Gibraltar Pound'), ('GMD', 'GMD - Dalasi'), ('GNF', 'GNF - Guinea Franc'), ('GTQ', 'GTQ - Quetzal'), ('GYD', 'GYD - Guyana Dollar'), ('HKD', 'HKD - Hong Kong Dollar'), ('HNL', 'HNL - Lempira'), ('HRK', 'HRK - Kuna'), ('HTG', 'HTG - Gourde'), ('HUF', 'HUF - Forint'), ('IDR', 'IDR - Rupiah'), ('ILS', 'ILS - New Israeli Sheqel'), ('INR', 'INR - Indian Rupee'), ('IQD', 'IQD - Iraqi Dinar'), ('IRR', 'IRR - Iranian Rial'), ('ISK', 'ISK - Iceland Krona'), ('JMD', 'JMD - Jamaican Dollar'), ('JOD', 'JOD - Jordanian Dinar'), ('JPY', 'JPY - Yen'), ('KES', 'KES - Kenyan Shilling'), ('KGS', 'KGS - Som'), ('KHR', 'KHR - Riel'), ('KMF', 'KMF - Comoro Franc'), ('KPW', 'KPW - North Korean Won'), ('KRW', 'KRW - Won'), ('KWD', 'KWD - Kuwaiti Dinar'), ('KYD', 'KYD - Cayman Islands Dollar'), ('KZT', 'KZT - Tenge'), ('LAK', 'LAK - Kip'), ('LBP', 'LBP - Lebanese Pound'), ('LKR', 'LKR - Sri Lanka Rupee'), ('LRD', 'LRD - Liberian Dollar'), ('LSL', 'LSL - Loti'), ('LTL', 'LTL - Lithuanian Litas'), ('LVL', 'LVL - Latvian Lats'), ('LYD', 'LYD - Libyan Dinar'), ('MAD', 'MAD - Moroccan Dirham'), ('MDL', 'MDL - Moldovan Leu'), ('MGA', 'MGA - Malagasy Ariary'), ('MKD', 'MKD - Denar'), ('MMK', 'MMK - Kyat'), ('MNT', 'MNT - Tugrik'), ('MOP', 'MOP - Pataca'), ('MRO', 'MRO - Ouguiya'), ('MRU', 'MRU - Ouguiya'), ('MUR', 'MUR - Mauritius Rupee'), ('MVR', 'MVR - Rufiyaa'), ('MWK', 'MWK - Malawi Kwacha'), ('MXN', 'MXN - Mexican Peso'), ('MXV', 'MXV - Mexican Unidad de Inversion (UDI)'), ('MYR', 'MYR - Malaysian Ringgit'), ('MZN', 'MZN - Metical'), ('NAD', 'NAD - Namibia Dollar'), ('NGN', 'NGN - Naira'), ('NIO', 'NIO - Cordoba Oro'), ('NOK', 'NOK - Norwegian Krone'), ('NPR', 'NPR - Nepalese Rupee'), ('NZD', 'NZD - New Zealand Dollar'), ('OMR', 'OMR - Rial Omani'), ('PAB', 'PAB - Balboa'), ('PEN', 'PEN - Nuevo Sol'), ('PGK', 'PGK - Kina'), ('PHP', 'PHP - Philippine Peso'), ('PKR', 'PKR - Pakistan Rupee'), ('PLN', 'PLN - Zloty'), ('PYG', 'PYG - Guarani'), ('QAR', 'QAR - Qatari Rial'), ('RON', 'RON - Romanian Leu'), ('RSD', 'RSD - Serbian Dinar'), ('RUB', 'RUB - Russian Ruble'), ('RWF', 'RWF - Rwanda Franc'), ('SAR', 'SAR - Saudi Riyal'), ('SBD', 'SBD - Solomon Islands Dollar'), ('SCR', 'SCR - Seychelles Rupee'), ('SDG', 'SDG - Sudanese Pound'), ('SEK', 'SEK - Swedish Krona'), ('SGD', 'SGD - Singapore Dollar'), ('SHP', 'SHP - Saint Helena Pound'), ('SLL', 'SLL - Leone'), ('SOS', 'SOS - Somali Shilling'), ('SSP', 'SSP - South Sudanese Pound'), ('SRD', 'SRD - Surinam Dollar'), ('STD', 'STD - Dobra'), ('STN', 'STN - Dobra'), ('SVC', 'SVC - El Salvador Colon'), ('SYP', 'SYP - Syrian Pound'), ('SZL', 'SZL - Lilangeni'), ('THB', 'THB - Baht'), ('TJS', 'TJS - Somoni'), ('TMT', 'TMT - Manat'), ('TND', 'TND - Tunisian Dinar'), ('TOP', 'TOP - Paanga'), ('TRY', 'TRY - Turkish Lira'), ('TTD', 'TTD - Trinidad and Tobago Dollar'), ('TWD', 'TWD - New Taiwan Dollar'), ('TZS', 'TZS - Tanzanian Shilling'), ('UAH', 'UAH - Hryvnia'), ('UGX', 'UGX - Uganda Shilling'), ('USD', 'USD - US Dollar'), ('USN', 'USN - US Dollar (Next day)'), ('USS', 'USS - US Dollar (Same day)'), ('UYI', 'UYI - Uruguay Peso en Unidades Indexadas'), ('UYU', 'UYU - Peso Uruguayo'), ('UZS', 'UZS - Uzbekistan Sum'), ('VEF', 'VEF - Bolivar'), ('VES', 'VES - Bolivar Soberano'), ('VND', 'VND - Dong'), ('VUV', 'VUV - Vatu'), ('WST', 'WST - Tala'), ('XAF', 'XAF - CFA Franc BEAC'), ('XBT', 'XBT - Bitcoin'), ('XCD', 'XCD - East Caribbean Dollar'), ('XDR', 'XDR - International Monetary Fund (IMF) Special Drawing Right (SDR)'), ('XOF', 'XOF - CFA Franc BCEAO'), ('XPF', 'XPF - CFP Franc'), ('YER', 'YER - Yemeni Rial'), ('ZAR', 'ZAR - Rand'), ('ZMK', 'ZMK - Zambian Kwacha'), ('ZMW', 'ZMW - Zambian Kwacha'), ('ZWL', 'ZWL - Zimbabwe Dollar')]
DONATE_DISABLED = ['', '3', '4', '5', '6']
exception DoesNotExist

Bases: ObjectDoesNotExist

EDIT_DISABLED = []
HIERARCHY_OPTIONS = ((1, 'Core Activity'), (2, 'Sub Activity'), (3, 'Lower Sub Activity'))
LANGUAGE_OPTIONS = (('de', 'German'), ('en', 'English'), ('es', 'Spanish'), ('fr', 'French'), ('nl', 'Dutch'), ('ru', 'Russian'))
exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

NOT_SUSPENDED = ['', '1', '2', '3', '4', '5']
STATUSES = (('N', ''), ('H', 'Needs funding'), ('A', 'Active'), ('C', 'Complete'), ('L', 'Cancelled'), ('R', 'Archived'))
STATUSES_COLORS = {'': 'grey', '1': 'orange', '2': '#AFF167', '3': 'grey', '4': 'grey', '5': 'red', '6': 'grey'}
STATUS_ACTIVE = 'A'
STATUS_ARCHIVED = 'R'
STATUS_CANCELLED = 'L'
STATUS_COMPLETE = 'C'
STATUS_NEEDS_FUNDING = 'H'
STATUS_NONE = 'N'
STATUS_TO_CODE = {'A': '2', 'C': '3', 'H': '1', 'L': '5', 'N': '', 'R': '3'}
TARGETS_AT_OPTION = (('period', 'Period'), ('indicator', 'Indicator'), ('both', 'Both'))
accepts_donations()[source]

Returns True if a project accepts donations, otherwise False. A project accepts donations when the donate url is set, the project is published, the project needs funding and is not cancelled or archived.

static add_custom_fields(project_id, organisations)[source]
add_reference(indicator, reference)[source]
add_to_program(program)[source]
add_validation_set(validation_set)[source]
aggregate_children

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

aggregate_to_parent

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

all_partners()[source]
background

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

benchmarks

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.

budget

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

budget_currency_totals()[source]
budget_currency_totals_string()[source]
budget_items

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.

budget_total()[source]
cacheable_url
capital_spend_percentage

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

categories

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

check_child_imported_results()[source]

Make sure children haven’t imported results

check_imported_results()[source]

Ensure that a project doesn’t have results which were imported from a parent

check_old_parent_results(new_parent: Project)[source]

Ensure imported results all point to the new parent

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.

collaboration_type

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

conditions

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.

contacts

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.

contributes_to_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.

contributes_to_project_id
copy_default_period(parent, set_parent=True)[source]
copy_default_period_to_children(default_period)[source]

Copy default period to all children that imported results from this project.

copy_dimension_name(source_dimension_name, set_parent=True)[source]
copy_dimension_name_to_children(dimension_name)[source]

Copy dimension_name to all children that imported from this project.

copy_dimension_value(dimension_name, source_dimension_value, set_parent=True)[source]
copy_indicator(result, source_indicator, set_parent=True)[source]

Copy a source_indicator to the result, setting it as parent if specified.

NOTE: There can only be one child for an indicator, per result. This method automatically updates an existing child indicator, if present.

It also triggers the creation of periods, dimensions and references on the indicator, if the indicator is being created and not updated.

copy_period(indicator, source_period, set_parent=True)[source]

Copy the source period to the indicator, and set it as a parent if specified.

NOTE: There can only be one child for a period, per indicator. This method automatically updates the existing one, if there is one.

copy_result(source_result, set_parent=True)[source]

Copy the source_result to this project, setting it as parent if specified.

copy_result_to_children(result)[source]

Copy result to all children that imported results from this project.

copy_results(source_project)[source]

Copy results from a source project.

countries()[source]

Return a list of countries for the project.

country_budget_items

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.

country_budget_vocabulary

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

created_at

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

crsadd

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

currency

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

current_image

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

current_image_caption

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

current_image_credit

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

current_status

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

custom_fields

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.

date_end_actual

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

date_end_planned

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

date_start_actual

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

date_start_planned

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

default_aid_type

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

default_aid_type_vocabulary

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

default_finance_type

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

default_flow_type

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

default_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 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.

default_tied_status

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

delete(using=None, keep_parents=False)[source]
delete_parent(force=False, update_descendants=True)[source]

Basically removes all parents

descriptions_order

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 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.

disaggregation_contributions

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.

do_import_results(parent_project)[source]
documents

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.

donate_url

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

donations

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

extending_partners()[source]
external_parent_iati_activity_id

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

field_partners()[source]
find_primary_organisation()[source]

This method tries to return the “managing” partner organisation.

focus_areas()[source]
fss

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

funding_partners()[source]
funding_partnerships()[source]

Return the Partnership objects associated with the project that have funding information

funds

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

funds_needed

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

get_absolute_url()[source]
get_budget()[source]
get_budget_project_currency()[source]
get_collaboration_type_display(*, field=<akvo.rsr.fields.ValidXMLCharField: collaboration_type>)
get_country_budget_vocabulary_display(*, field=<akvo.rsr.fields.ValidXMLCharField: country_budget_vocabulary>)
get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
get_default_aid_type_vocabulary_display(*, field=<akvo.rsr.fields.ValidXMLCharField: default_aid_type_vocabulary>)
get_default_finance_type_display(*, field=<akvo.rsr.fields.ValidXMLCharField: default_finance_type>)
get_default_flow_type_display(*, field=<akvo.rsr.fields.ValidXMLCharField: default_flow_type>)
get_default_tied_status_display(*, field=<akvo.rsr.fields.ValidXMLCharField: default_tied_status>)
get_funds()[source]

All money given to a project

get_funds_needed()[source]

How much more is needed to fulfill the project’s budget needs. In case of a negative value or a value less than 1, the value is set to 0.

get_funds_needed_project_currency()[source]

Funds need in project currency, only used if budget items have multiple currencies

get_hierarchy_display(*, field=<django.db.models.fields.PositiveIntegerField: hierarchy>)
get_hierarchy_organisation()[source]

Return the hierarchy organisation if project belongs to one.

get_iati_profile_url()[source]
get_iati_status_display(*, field=<akvo.rsr.fields.ValidXMLCharField: iati_status>)
get_language_display(*, field=<akvo.rsr.fields.ValidXMLCharField: language>)
get_pledged()[source]

How much is pledges by funding organisations

get_program()[source]

Return the program which this project includes.

get_project_scope_display(*, field=<akvo.rsr.fields.ValidXMLCharField: project_scope>)
get_status_display(*, field=<akvo.rsr.fields.ValidXMLCharField: status>)
get_targets_at_display(*, field=<akvo.rsr.fields.ValidXMLCharField: targets_at>)
goals

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.

goals_overview

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

has_imported_results()[source]
has_indicator_labels()[source]
has_multiple_budget_currencies()[source]
has_relations()[source]
hierarchy

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

humanitarian

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

humanitarian_scopes

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.

iati_activity_id

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

iati_checks

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.

iati_checks_status(status)[source]
iati_collaboration_type()[source]
iati_collaboration_type_unicode()[source]
iati_default_aid_type()[source]
iati_default_aid_type_unicode()[source]
iati_default_finance_type()[source]
iati_default_finance_type_unicode()[source]
iati_default_flow_type()[source]
iati_default_flow_type_unicode()[source]
iati_default_tied_status()[source]
iati_default_tied_status_unicode()[source]
iati_errors()[source]
iati_errors_unicode()[source]
iati_identifier_context()[source]
iati_prefixes()[source]

Return the IATI ID prefixes for the project.

Based on the reporting organisations, returns the IATI prefixes.

iati_project_exports

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.

iati_project_scope()[source]
iati_project_scope_unicode()[source]
iati_status

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

iati_successes()[source]
iati_successes_unicode()[source]
iati_warnings()[source]
iati_warnings_unicode()[source]
iatiactivityvalidationjob_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 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.

iatiexport_set

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

id

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

import_indicator(parent_indicator_id)[source]
Parameters:

parent_indicator_id – ID of indicator we want to create a child of in this self’s

results framework :return: new indicator object or None if it couldn’t be imported/added

import_result(parent_result_id)[source]

Import a specific result from the parent project.

import_results()[source]

Import results from the parent project.

in_eutf_hierarchy()[source]

Check if the project is a part of the EUTF hierarchy.

in_nuffic_hierarchy()[source]

Check if the project is a part of the Nuffic hierarchy.

indicator_custom_fields

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.

indicator_labels()[source]
is_empty()[source]
is_hierarchy_root()[source]

Return True if the project is root project in a hierarchy.

is_impact_project

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

is_master_program()[source]

Return True if the project is a master program.

is_public

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

is_published()[source]
is_unep_project
keyword_labels()[source]
keyword_logos()[source]

Return the keywords of the project which have a logo.

keywords

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

language

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.

property last_modified_by

Return the user who last edited this project and when the edit was made.

last_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.

last_update_id
legacy_data

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.

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.

locations

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.

classmethod log_project_addition(project_id, user)[source]
narrative_reports

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.

classmethod new_project_created(project_id, user)[source]

Hook to do some book-keeping for a newly created project.

NOTE: This hook cannot be moved into a post-save hook since we need information about the user who created this project, to perform some of the actions.

notes

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.ManagerFromProjectQuerySet object>
organisation_codelist()[source]

Return organisation specific custom codelist, if any.

partner_organisation_pks()[source]

Return all organisation ids along with hierarchy owner

If project is in a hierarchy, includes the hierarchy owner in the partners list.

partners

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

partners_info()[source]

Return a dict of the distinct partners with the organisation as key and as content: 1. The partnerships of the organisation 2. The (added up) funding amount, if available. Otherwise None. E.g. {<Organisation 1>: [[<Partnership 1>,], 10000],}

partnerships

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.

path
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 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.

planned_disbursements

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.

policy_markers

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.

primary_location

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.

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

primary_organisation_id
project_dates()[source]

Return the project start and end dates, preferably the actuals. If they are not set, use the planned values.

project_hierarchy_context(context)[source]

Add info used in single period hierarchy projects if present

project_plan

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

project_plan_summary

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

project_scope

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

project_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 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.

project_updates

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.

projecthierarchy

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

projectrole_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 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.

publish()[source]

Set the publishing status to published.

property publishing_orgs

Returns the organisations that have the right to publish the project. In other words, that have Organisation.can_create_project set to True.

publishingstatus

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

recipient_countries

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.

recipient_regions

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.

related_projects

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.

related_to_projects

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.

property reporting_org

Returns the organisation of the partnership that is the reporting-org, if there is one

property reporting_partner

In some cases we need the partnership object instead of the organisation to be able to access is_secondary_reporter

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.

run_iati_checks

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

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.

sector_categories()[source]
sector_categories_codes()[source]
sectors

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.

set_accountable_partner(organisation)[source]

Set the organisation as an accountable partner.

set_parent(parent_project: Project, force: bool = False)[source]

Add this node as a child to a parent

There’s NO a check if this is possible. Use the helper if you want checks

set_reporting_org(organisation)[source]

Set the reporting-org for the project.

show_keywords()[source]
show_plain_status()[source]

Show the current project status value without styling

show_status()[source]

Show the current project status

sponsor_partners()[source]
status

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

subtitle

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

support_partners()[source]
sustainability

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

target_group

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

targets_at

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

third_party_projects

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.

thumbnails

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.

title

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

transactions

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.

unpublish()[source]

Set the publishing status to unpublished.

update_budget()[source]

Update de-normalized field

update_dimension_value(dimension_name, parent_dimension_value)[source]

Update dimension value base on the parent dimension value attribute.

update_funds()[source]

Update de-normalized field

update_funds_needed()[source]

Update de-normalized field

update_indicator(result, parent_indicator)[source]

Update an indicator based on parent indicator attributes.

update_period(indicator, parent_period)[source]

Update a period based on the parent period attributes.

update_use_project_roles()[source]
updates_desc()[source]

ProjectUpdate list for self, newest first.

use_project_roles

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

users_with_access(group_name=None)[source]
uses_single_indicator_period() str | None[source]

Return the settings name of the hierarchy if there is one

uuid

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

validations

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

class akvo.rsr.models.ProjectCondition(id, project, text, type)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

get_type_display(*, field=<akvo.rsr.fields.ValidXMLCharField: type>)
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.

objects = <django.db.models.manager.Manager object>
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
text

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.ProjectContact(id, project, type, person_name, email, job_title, organisation, telephone, mailing_address, state, country, department, website)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

country

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.

country_id
department

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

email

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>)
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.

job_title

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

mailing_address

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>
organisation

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

person_name

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

project_id
state

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

telephone

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.

website

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

class akvo.rsr.models.ProjectDocument(id, project, url, document, format, title, title_language, language, document_date)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

categories

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.

document

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)
document_date

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

format

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

get_format_display(*, field=<akvo.rsr.fields.ValidXMLCharField: format>)
get_language_display(*, field=<akvo.rsr.fields.ValidXMLCharField: language>)
get_title_language_display(*, field=<akvo.rsr.fields.ValidXMLCharField: title_language>)
iati_format()[source]
iati_format_unicode()[source]
iati_language()[source]
iati_language_unicode()[source]
iati_title_language()[source]
iati_title_language_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.

language

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>
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
title

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

title_language

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

url

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.ProjectDocumentCategory(id, document, category)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

category

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

document

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.

document_id
get_category_display(*, field=<akvo.rsr.fields.ValidXMLCharField: category>)
iati_category()[source]
iati_category_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.

objects = <django.db.models.manager.Manager object>
class akvo.rsr.models.ProjectEditorValidation(*args, **kwargs)[source]

Bases: Model

A validation is used to set a certain field or combination of fields in the project editor as mandatory, hidden or read only.

The rule field is the key in this model. There are 2 options for this field: - Only a model (e.g. “partnership”) indicating that at least one partnership is mandatory or that partnerships should be hidden in the project editor. - A model and a field (e.g. “budgetitem.other_extra”) indicating that the field is mandatory or that the field should be hidden in the project editor.

Also, any combination of the above options is possible. Separated by ||, which indicates an OR relationship. So “project.title||project.subtitle” with a mandatory action indicates that either the title or the subtitle of a project is mandatory.

ACTIONS = [(1, 'Mandatory'), (2, 'Hidden')]
ACTIONS_LABELS = ['Mandatory', 'Hidden']
ACTIONS_LIST = [1, 2]
exception DoesNotExist

Bases: ObjectDoesNotExist

HIDDEN_ACTION = 2
MANDATORY_ACTION = 1
exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

action

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

get_action_display(*, field=<django.db.models.fields.PositiveSmallIntegerField: action>)
id

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>
validation

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

validation_set

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.

validation_set_id
class akvo.rsr.models.ProjectEditorValidationSet(*args, **kwargs)[source]

Bases: Model

A set of project editor validations, with a name and description. The name and description will be displayed together with the progress bar in the project editor.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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

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.

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>
projects

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

validations

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.

class akvo.rsr.models.ProjectHierarchy(*args, **kwargs)[source]

Bases: Model

The actual “Program” with a project hierarchy.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

property descendants

The entire tree in a list. No order is guaranteed

id

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

is_master

Used when an organisation has one program under which they would like to create subprograms

max_depth

TODO: It is unclear why this field currently exists

objects = <django.db.models.manager.Manager object>
property organisation

The reporting organisation of the tree

partnersite_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 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.

property project_count

The number of children without counting the root project

property project_ids
project_relation = 'projecthierarchy__in'
root_project

The root of the program It can be used to create subprograms / a program tree

root_project_id
class akvo.rsr.models.ProjectLocation(id, latitude, longitude, city, state, address_1, address_2, postcode, country, location_target, reference, location_code, vocabulary, name, description, activity_description, exactness, location_reach, location_class, feature_designation)[source]

Bases: BaseLocation

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

activity_description

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

address_1

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

address_2

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

administratives

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.

city

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

country

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.

country_id
description

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

exactness

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

feature_designation

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

get_exactness_display(*, field=<akvo.rsr.fields.ValidXMLCharField: exactness>)
get_feature_designation_display(*, field=<akvo.rsr.fields.ValidXMLCharField: feature_designation>)
get_location_class_display(*, field=<akvo.rsr.fields.ValidXMLCharField: location_class>)
get_location_reach_display(*, field=<akvo.rsr.fields.ValidXMLCharField: location_reach>)
get_vocabulary_display(*, field=<akvo.rsr.fields.ValidXMLCharField: vocabulary>)
iati_class()[source]
iati_class_unicode()[source]
iati_country()[source]
iati_country_unicode()[source]
iati_designation()[source]
iati_designation_unicode()[source]
iati_exactness()[source]
iati_exactness_unicode()[source]
iati_reach()[source]
iati_reach_unicode()[source]
iati_vocabulary()[source]
iati_vocabulary_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.

latitude

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

location_class

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

location_code

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

location_reach

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

location_target

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.

location_target_id
longitude

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>
postcode

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

project_relation = 'locations__in'
project_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 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.

reference

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

state

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

vocabulary

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.ProjectRole(id, project, user, group)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

group

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.

group_id
id

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>
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
user

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.

user_id
class akvo.rsr.models.ProjectThumbnail(id, project, geometry, url, full_size_url)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

full_size_url

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

geometry

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.

objects = <django.db.models.manager.Manager object>
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
url

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.ProjectUpdate(id, created_at, last_modified_at, project, user, title, text, language, event_date, primary_location, photo, photo_caption, photo_credit, video, video_caption, video_credit, update_method, user_agent, uuid, notes)[source]

Bases: TimestampsMixin

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

UPDATE_METHODS = (('W', 'web'), ('E', 'e-mail'), ('S', 'SMS'), ('M', 'mobile'))
cacheable_url
created_at

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

property edited

Edited status for an update.

An update is considered as edited only if it was edited after 1 minute of posting it.

event_date

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

get_absolute_url()[source]
get_language_display(*, field=<akvo.rsr.fields.ValidXMLCharField: language>)
get_next_by_event_date(*, field=<django.db.models.fields.DateField: event_date>, is_next=True, **kwargs)
get_previous_by_event_date(*, field=<django.db.models.fields.DateField: event_date>, is_next=False, **kwargs)
get_update_method_display(*, field=<akvo.rsr.fields.ValidXMLCharField: update_method>)
id

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

img(value='')[source]
language

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.

locations

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.

notes

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>
photo

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

photo_caption

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

photo_credit

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

photos

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.

primary_location

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.

primary_location_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
text

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

the_project

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.

property time_gmt
property time_last_updated_gmt
title

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

update_method

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

user

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.

user_agent

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

user_id
uuid

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

video

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

video_caption

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

video_credit

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.ProjectUpdateLocation(id, latitude, longitude, city, state, address_1, address_2, postcode, country, location_target)[source]

Bases: BaseLocation

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

address_1

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

address_2

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

city

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

country

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.

country_id
id

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

latitude

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

location_target

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.

location_target_id
longitude

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>
postcode

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

projectupdate_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 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.

state

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.ProjectUpdatePhoto(id, update, photo, caption, credit)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

caption

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

credit

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.

objects = <django.db.models.manager.Manager object>
photo

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

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
class akvo.rsr.models.PublishingStatus(*args, **kwargs)[source]

Bases: Model

Keep track of publishing status.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

PUBLISHING_STATUS = (('unpublished', 'Unpublished'), ('published', 'Published'))
STATUS_PUBLISHED = 'published'
STATUS_UNPUBLISHED = 'unpublished'
clean()[source]

Projects can only be published, when several checks have been performed.

get_status_display(*, field=<akvo.rsr.fields.ValidXMLCharField: status>)
id

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>
project

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

project_id
status

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.RecipientCountry(id, project, country, percentage, text)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

country

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

get_country_display(*, field=<akvo.rsr.fields.ValidXMLCharField: country>)
iati_country()[source]
iati_country_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.

objects = <django.db.models.manager.Manager object>
percentage

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

project_id
text

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.RecipientRegion(id, project, region, region_vocabulary, region_vocabulary_uri, percentage, text)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

get_region_display(*, field=<akvo.rsr.fields.ValidXMLCharField: region>)
get_region_vocabulary_display(*, field=<akvo.rsr.fields.ValidXMLCharField: region_vocabulary>)
iati_region()[source]
iati_region_unicode()[source]
iati_vocabulary()[source]
iati_vocabulary_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.

objects = <django.db.models.manager.Manager object>
percentage

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

project_id
region

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

region_vocabulary

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

region_vocabulary_uri

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

text

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.RelatedProject(id, project, related_project, related_iati_id, relation)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

PROJECT_RELATION_CHILD = '2'
PROJECT_RELATION_CO_FUNDED = '4'
PROJECT_RELATION_PARENT = '1'
PROJECT_RELATION_SIBLING = '3'
PROJECT_RELATION_THIRD_PARTY = '5'
get_relation_display(*, field=<akvo.rsr.fields.ValidXMLCharField: relation>)
iati_relation()[source]
iati_relation_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.

objects = <django.db.models.manager.Manager object>
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
property reciprocal_relation

Return the relation between related_project and project.

relation specifies the relationship between project and related_project. This returns the reciprocal relationship.

related_iati_id

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

related_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.

related_project_id
relation

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.Report(id, name, title, description, url)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

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

Over-ridden to automatically fill in the parameters field.

description

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

formats

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

id

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

property multiple_lines
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>
organisations

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

property parameters
title

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

url

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.ReportFormat(id, name, display_name, icon)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

display_name

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

icon

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.

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>
report_set

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

class akvo.rsr.models.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.

class akvo.rsr.models.Sector(id, project, sector_code, text, vocabulary, vocabulary_uri, percentage)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

get_vocabulary_display(*, field=<akvo.rsr.fields.ValidXMLCharField: vocabulary>)
iati_sector()[source]
iati_sector_codes()[source]
iati_sector_unicode()[source]
iati_vocabulary()[source]
iati_vocabulary_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.

objects = <django.db.models.manager.Manager object>
percentage

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

project_id
sector_code

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

text

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

vocabulary

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

vocabulary_uri

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.Transaction(id, project, reference, aid_type_vocabulary, aid_type, description, disbursement_channel, finance_type, flow_type, tied_status, transaction_date, transaction_type, value, value_date, currency, provider_organisation, provider_organisation_activity, receiver_organisation, receiver_organisation_activity, recipient_country, recipient_region, recipient_region_vocabulary, recipient_region_vocabulary_uri, humanitarian)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

aid_type

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

aid_type_vocabulary

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

currency

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

description

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

disbursement_channel

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

finance_type

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

flow_type

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

get_aid_type_vocabulary_display(*, field=<akvo.rsr.fields.ValidXMLCharField: aid_type_vocabulary>)
get_currency()[source]
get_currency_display(*, field=<akvo.rsr.fields.ValidXMLCharField: currency>)
get_disbursement_channel_display(*, field=<akvo.rsr.fields.ValidXMLCharField: disbursement_channel>)
get_finance_type_display(*, field=<akvo.rsr.fields.ValidXMLCharField: finance_type>)
get_flow_type_display(*, field=<akvo.rsr.fields.ValidXMLCharField: flow_type>)
get_recipient_country_display(*, field=<akvo.rsr.fields.ValidXMLCharField: recipient_country>)
get_recipient_region_display(*, field=<akvo.rsr.fields.ValidXMLCharField: recipient_region>)
get_recipient_region_vocabulary_display(*, field=<akvo.rsr.fields.ValidXMLCharField: recipient_region_vocabulary>)
get_tied_status_display(*, field=<akvo.rsr.fields.ValidXMLCharField: tied_status>)
get_transaction_type_display(*, field=<akvo.rsr.fields.ValidXMLCharField: transaction_type>)
humanitarian

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

iati_aid_type()[source]
iati_aid_type_unicode()[source]
iati_currency()[source]
iati_currency_unicode()[source]
iati_disbursement_channel()[source]
iati_disbursement_channel_unicode()[source]
iati_finance_type()[source]
iati_finance_type_unicode()[source]
iati_flow_type()[source]
iati_flow_type_unicode()[source]
iati_recipient_country()[source]
iati_recipient_country_unicode()[source]
iati_recipient_region()[source]
iati_recipient_region_unicode()[source]
iati_recipient_region_vocabulary()[source]
iati_recipient_region_vocabulary_unicode()[source]
iati_tied_status()[source]
iati_tied_status_unicode()[source]
iati_transaction_type()[source]
iati_transaction_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.

objects = <django.db.models.manager.Manager object>
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
provider_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 a ForwardManyToOneDescriptor instance.

provider_organisation_activity

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

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

receiver_organisation_activity

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

receiver_organisation_id
recipient_country

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

recipient_region

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

recipient_region_vocabulary

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

recipient_region_vocabulary_uri

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

reference

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

sectors

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.

tied_status

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

transaction_date

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

transaction_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.

value_date

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.TransactionSector(id, transaction, code, text, vocabulary, vocabulary_uri)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

code

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

get_vocabulary_display(*, field=<akvo.rsr.fields.ValidXMLCharField: vocabulary>)
iati_sector()[source]
iati_sector_unicode()[source]
iati_vocabulary()[source]
iati_vocabulary_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.

objects = <django.db.models.manager.Manager object>
project_relation = 'transactions__sectors__in'
text

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

transaction

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.

transaction_id
vocabulary

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

vocabulary_uri

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

Bases: AbstractBaseUser, PermissionsMixin

A fully featured User model with admin-compliant permissions that uses a full-length email field as the username. Email and password are required. Other fields are optional.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

REQUIRED_FIELDS = ['email']
USERNAME_FIELD = 'username'
admin_of(org)[source]

Checks if the user is an Admin of this organisation.

:param org; an Organisation instance.

admin_projects()[source]

Return all projects of orgs where user is an admin.

api_key

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

approved_employments(group_names=None)[source]

Return approved employments.

When no group_names are provided, all the employments are returned.

group_names can be used to filter employments in specific groups.

approved_organisations(group_names=None)[source]

Return all approved organisations of the user.

approved_period_updates

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.

assigned_indicators

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

auth_token

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

avatar

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

cacheable_url
can_create_project()[source]

Check to see if the user can create a project.

can_create_projects_in_program(program)[source]

Check to see if the user can create a project in a program.

can_edit_access(project)[source]

Check if the user can edit access to a project.

can_edit_enumerator_access(project)[source]
can_edit_project(project, use_cached_attr=False)[source]

Check if the user can edit a project.

The `use_cached_attr’ should be used when this call is being made on a list of projects, in a single request. Turning on this flag caches the list of projects on the user object, and uses that to determine if a project is editable, or not.

can_edit_settings(project)[source]

Check if the user can edit settings of a project.

can_import_results(project)[source]

Check to see if the user can import results to the specified project.

can_publish_project(project)[source]

Check if the user can publish a project.

can_view_project(project)[source]

Check if the user can view a project.

check_password(raw_password)[source]

Returns a boolean of whether the raw_password was correct. Handles hashing formats behind the scenes.

created_period_updates

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.

date_joined

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

email

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

email_user(subject, message, from_email=None)[source]

Sends an email to this User.

employers

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.

employments_dict(org_list)[source]

Represent User as dict with employments. The org_list is a list of approved organisations of the original user. Based on this, the original user will have the option to approve / delete the employment.

enforce_2fa

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

enumerator_projects()[source]

Return all projects where user is an enumerator.

first_name

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

first_organisation()[source]
get_absolute_url()[source]
get_admin_employment_orgs()[source]

Return all organisations of the user where they are Admins

property get_api_key
get_full_name()[source]
get_next_by_date_joined(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=True, **kwargs)
get_non_admin_employment_orgs()[source]

Return all organisations of the user where they are not Admins

get_organisation_names()[source]
get_owned_org_users()[source]
get_permission_filter(permission, project_relation, include_user_owned=True)[source]

Convert a rules permission predicate into a queryset filter using Q objects.

project_relation is the string for constructing a field lookup to the corresponding Project of the queryset’s model.

get_previous_by_date_joined(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=False, **kwargs)
get_short_name()[source]

Returns only the first_name, but is needed because the default admin templates use this method.

groups

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

has_role_in_org(org, group)[source]

Helper function to determine if a user is in a certain group at an organisation.

:param org; an Organisation instance. :param group; a Group instance.

iati_exports

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.

id

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

in_group(group, organisation=None)[source]

Returns whether a user is part of a group. Optionally an organisation can be added to check if a user is part of a group for the organisation.

indicatorperioddatacomment_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 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_active

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

is_admin

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

is_staff

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

is_superuser

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

is_support

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

last_login

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

last_name

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

latest_update_date()[source]
logentry_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 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.

me_manager_for_project(project)[source]

Checks if the user is an M&E Manager for this project

:param project; a Project instance

me_manager_of(org)[source]

Checks if the user is an M&E Manager of this organisation.

:param org; an Organisation instance

me_manager_projects()[source]

Return all projects of orgs where user is m&e manager.

my_projects(group_names=None, show_restricted=False)[source]
notes

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

objects = <akvo.rsr.models.user.CustomUserManager object>
organisations

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

static parse_permission_expression(permission_expression, permissions, operators, ignored=None)[source]

Convert permission expression to a queryset filter using permissions mapping

NOTE: This function does no error checking and assumes that all the expressions are valid, and all the operations in the expression are binary and correctly parenthesized. The expressions from the rules library satisfy these assumptions and can be safely used as inputs to this function.

password

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

passwordhistory_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 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.

phonedevice_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 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.

project_editor_me_manager_projects()[source]

Return all projects of orgs where user is project editor or m&e manager.

project_editor_of(org)[source]

Checks if the user is a Project editor of this organisation.

:param org; an Organisation instance

projectrole_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 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.

projectupdate_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 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.

request_tokens

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.

requesttokenlog_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 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.

seen_announcements

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

staticdevice_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 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.

totpdevice_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 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.

updates()[source]

return all updates created by the user or by organisation users if requesting user is admin

property user

Support for self as profile. Use of this is deprecated

user_management_organisations()[source]
user_manager_projects()[source]

Return all projects where user is a user manager.

user_name()[source]
user_permissions

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 and Topping.pizzas are ManyToManyDescriptor instances.

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

username

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

viewable_indicator_updates(project_id)[source]

Subpackages

Submodules