loefsys.groups.models package

Module containing the models related to groups.

class loefsys.groups.models.Board(*args, **kwargs)

Bases: LoefbijterGroup

A group model for the board of Loefbijter.

The board is a group of people that run the association. The board members change yearly so every board has a year attached to it.

year

The year of the board, starting in the founding year.

Type:

int

year

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: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

loefbijtergroup_ptr

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

loefbijtergroup_ptr_id
class loefsys.groups.models.Committee(*args, **kwargs)

Bases: LoefbijterGroup

Model representing a committee.

A committee is a group of people that work together to run or manage a certain part of the association. An example of this is the “WebCie” which is responsible for the website of the association. A committee can be mandatory, meaning that new members can be assigned to this committee to satisfy their committee duty.

mandatory

A flag that shows whether the committee is a mandatory committee. If a committee is one of the mandatory committees, new members can be assigned to this committee to satisfy their committee duty.

Type:

bool

mandatory

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: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

loefbijtergroup_ptr

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

loefbijtergroup_ptr_id
class loefsys.groups.models.Fraternity(*args, **kwargs)

Bases: LoefbijterGroup

Model defining fraternities within the associations.

Fraternities are groups of members that want to do more outside of the regular association activities. Fraternities can be mainly male, mainly female or mixed.

gender_base

The type of fraternity.

Type:

FraternityGenders

gender_base

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: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

get_gender_base_display(*, field=<django.db.models.fields.PositiveSmallIntegerField: gender_base>)
loefbijtergroup_ptr

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

loefbijtergroup_ptr_id
class loefsys.groups.models.LoefbijterGroup(*args, **kwargs)

Bases: Model Extensions

Describes a group of members.

Groups are a generic way of categorizing users to apply permissions, or some other label, to those users. A user can belong to any number of groups.

This model represents a group within Loefbijter. Subclasses exist for specific groups, such as boards or committees, but the generic model is also available. This model mirrors the behaviour of the internal Django Groups model as it provides an easy way of managing permissions.

name

The name of the group.

Type:

str

description

A description of the group.

Type:

str

permissions

The permissions for this group.

Type:

QuerySet or Permission

date_foundation

The date that the group was founded on.

Type:

date

date_discontinuation

The date that the group ceased to exist. Cannot be before date_foundation.

Type:

date, None

display_members

A flag that determines whether the members of the group are publicly visible.

Type:

bool

Properties
----------
active

A property that returns whether the group is currently active.

It is calculated by whether date_discontinuation exists and whether the date has passed.

name

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

description

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

permissions

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

date_foundation

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

date_discontinuation

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

property active

Return whether the group is currently active.

display_members

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

objects = <loefsys.groups.models.group.GroupManager object>
natural_key()

Return the natural key for a group.

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

board

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

committee

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

created

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

fraternity

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
get_next_by_date_foundation(*, field=<django.db.models.fields.DateField: date_foundation>, 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_date_foundation(*, field=<django.db.models.fields.DateField: date_foundation>, is_next=False, **kwargs)
get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
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.

organizing_group

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

taskforce

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

user_set

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

Pizza.toppings and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

yearclub

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

class loefsys.groups.models.Taskforce(*args, **kwargs)

Bases: LoefbijterGroup

Model representing a taskforce.

A taskforce is a group of people that have a joined task, while not being a committee.

requires_nda

A flag that shows whether an NDA needs to be signed to be in the taskforce.

Type:

bool

requires_nda

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: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

loefbijtergroup_ptr

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

loefbijtergroup_ptr_id
class loefsys.groups.models.YearClub(*args, **kwargs)

Bases: LoefbijterGroup

A year club consists of a group people belonging to the same year.

A year club is a group of members that joined the association in the same year. Year clubs usually host certain events for the association, and are tied to the year they joined the association.

year

The year of the year club.

Type:

int

year

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: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

loefbijtergroup_ptr

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

loefbijtergroup_ptr_id

Submodules