akvo.rsr.models.project_update module
- class akvo.rsr.models.project_update.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_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.
- 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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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 aForwardManyToOneDescriptor
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 aForwardManyToOneDescriptor
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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- property 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 aForwardManyToOneDescriptor
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.project_update.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 aForwardManyToOneDescriptor
instance.
- update_id