akvo.rsr.models.organisation_account module
- class akvo.rsr.models.organisation_account.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 aForwardOneToOneDescriptor
instance.
- organisation_id