akvo.rsr.models.location module

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

Bases: Model

class Meta[source]

Bases: object

abstract = False
app_label = 'rsr'
ordering = ['id']
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
delete(*args, **kwargs)[source]
is_valid()[source]
latitude

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

longitude

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

postcode

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.

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

akvo.rsr.models.location.on_projectlocation_delete(sender, instance: ProjectLocation, using, **kwargs)[source]