membership

class gratipay.models.team.membership.Membership[source]

Teams may have zero or more members, who are participants that take money from the team.

add_member(participant, recorder)[source]

Add a participant to this team.

Parameters:
  • participant (Participant) – the participant to add
  • recorder (Participant) – the participant making the change
remove_member(participant, recorder)[source]

Remove a participant from this team.

Parameters:
  • participant (Participant) – the participant to remove
  • recorder (Participant) – the participant making the change
nmembers

The number of members. Read-only and computed (not in the db); equal to ndistributing_to.

get_memberships(current_participant=None)[source]

Return a list of member dicts.