loefsys.users.models.member module

Module containing the model definition for the member model.

class loefsys.users.models.member.MemberDetails(*args, **kwargs)

Bases: Model Extensions

Model that defines the properties for a member of Loefbijter.

This model contains the required details for a person to be a member of Loefbijter. Thus, it will only exist on a Person object when the person is a member.

user

The user that the membership details are for.

Type:

User

gender

The gender of the person.

Type:

Genders

birthday

The birthday of the member.

Type:

date

show_birthday

Flag to determine the person’s preference to publicly show their birthday.

If set to True, other people will be able to see this person’s birthday in loefsys.

Type:

bool

address

The address of the member.

Type:

Address or None

study_registration

The study registration for this member.

If this value is None, then this member does not study.

Type:

StudyRegistration or None

membership_set
Type:

QuerySet of Membership

user

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.

gender

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

birthday

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

show_birthday

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

address

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.

study_registration: StudyRegistration | None

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.

membership_set: QuerySet

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

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

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

address_id
created

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

get_gender_display(*, field=<django.db.models.fields.PositiveSmallIntegerField: gender>)
get_next_by_birthday(*, field=<django.db.models.fields.DateField: birthday>, is_next=True, **kwargs)
get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
get_previous_by_birthday(*, field=<django.db.models.fields.DateField: birthday>, is_next=False, **kwargs)
get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
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