akvo.rsr.models.organisation_document module
- class akvo.rsr.models.organisation_document.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 aReverseManyToOneDescriptor
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 aReverseManyToOneDescriptor
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>)
- 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 aForwardManyToOneDescriptor
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.organisation_document.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 aForwardManyToOneDescriptor
instance.
- document_id
- get_category_display(*, field=<akvo.rsr.fields.ValidXMLCharField: category>)
- 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.organisation_document.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 aForwardManyToOneDescriptor
instance.
- document_id
- get_country_display(*, field=<akvo.rsr.fields.ValidXMLCharField: country>)
- 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.