loefsys.groups.models.membership module

Module containing the definition for the group membership model.

class loefsys.groups.models.membership.GroupMembershipManager(*args, **kwargs)

Bases: Manager

Manager for the LoefbijterGroup model.

active() QuerySet

Filter and return only active group memberships.

Returns:

A query of filtered memberships that are active.

Return type:

QuerySet of GroupMembership

class loefsys.groups.models.membership.GroupMembership(*args, **kwargs)

Bases: Model Extensions

Describes a group membership.

It is the link between the many-to-many relationship of LoefbijterGroup and Contact.

TODO Currently this is not used. Find a way to integrate this effectively.

created

The date and time that this model was created.

Type:

datetime

modified

The date and time that this model was last modified.

Type:

datetime

user

The user that the membership applies to.

Type:

User

group

The group that the membership applies to.

Type:

LoefbijterGroup

chair

Defines whether this member has admin privileges for this group.

Type:

bool

role

The role of the member, if applicable.

Type:

str

member_since

The date that the person became member of the group.

Type:

date

member_until

The date that the member left/leaves the group.

Type:

date

note

A potential note on this membership. TODO Is this needed?

Type:

str

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 a ForwardManyToOneDescriptor instance.

group

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 a ForwardManyToOneDescriptor instance.

chair

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

role

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

member_since

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

member_until

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

note

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

created

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
get_next_by_member_since(*, field=<django.db.models.fields.DateField: member_since>, is_next=True, **kwargs)
get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
get_previous_by_member_since(*, field=<django.db.models.fields.DateField: member_since>, is_next=False, **kwargs)
get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
group_id
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

modified

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>
user_id