fairdm.contrib.contributors.choices#

Choice enumerations and identifier lookups for contributors.

Module Contents#

Classes#

OrganizationType

An organisation’s institutional kind, drawn from the types enumeration of ROR schema 2.1.

ContributionLevel

What a person may do on one record, each level including the ones before it.

AccountState

The four states a Person’s account can be in.

Data#

API#

class OrganizationType(*args, **kwds)#

Bases: django.db.models.TextChoices

An organisation’s institutional kind, drawn from the types enumeration of ROR schema 2.1.

ROR permits several types at once. This vocabulary narrows that to a single selection.

Initialization

EDUCATION#

(‘education’,)

FUNDER#

(‘funder’,)

HEALTHCARE#

(‘healthcare’,)

COMPANY#

(‘company’,)

ARCHIVE#

(‘archive’,)

NONPROFIT#

(‘nonprofit’,)

GOVERNMENT#

(‘government’,)

FACILITY#

(‘facility’,)

OTHER#

(‘other’,)

class ContributionLevel(*args, **kwds)#

Bases: django.db.models.IntegerChoices

What a person may do on one record, each level including the ones before it.

Stored as integers so that “at least this level” is a comparison.

Initialization

VIEW#

(1,)

EDIT#

(2,)

MANAGE#

(3,)

class AccountState(*args, **kwds)#

Bases: django.db.models.TextChoices

The four states a Person’s account can be in.

Never stored: Person.account_state derives one from is_active, is_claimed and email, and PersonQuerySet has a matching filter for each. “Inactive” takes precedence.

Initialization

GHOST#

(‘ghost’,)

INVITED#

(‘invited’,)

CLAIMED#

(‘claimed’,)

INACTIVE#

(‘inactive’,)

IdentifierLookup#

None