loefsys.members.models package
Module containing the models related to contacts and users.
- class loefsys.members.models.Address(*args, **kwargs)
Bases:
Model ExtensionsModel that defines an address.
- created
The timestamp of the creation of the model, automatically generated upon creation.
- Type:
- modified
The timestamp of last modification of this model, automatically generated upon update.
- Type:
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- city
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- country
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- 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_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_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.
- objects = <django.db.models.manager.Manager object>
- postal_code
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- street
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- street2
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- user
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.restaurantis aReverseOneToOneDescriptorinstance.
- class loefsys.members.models.Membership(*args, **kwargs)
Bases:
ModelModel defining a person’s membership of Loefbijter.
Over the course of a member’s presence at Loefbijter, their membership status may change. For example, an active member may become a passive member, or an exceptional member becomes alumnus. This model exists to keep a record of those statuses and status changes.
This also means that a person’s membership period with one status may not overlap with a period of another membership status. When a person’s membership status changes, the record of that status ends on day X and the record of the next status starts on the next day, day X+1. Validation logic is in place to ensure this integrity.
- member
The person that this membership belongs to.
- Type:
LoefbijterMember
- membership_type
The type of membership.
- Type:
MembershipTypes
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- clean()
Run validation on the model.
- end
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_membership_type_display(*, field=<django.db.models.fields.PositiveSmallIntegerField: membership_type>)
- get_next_by_start(*, field=<django.db.models.fields.DateField: start>, is_next=True, **kwargs)
- get_previous_by_start(*, field=<django.db.models.fields.DateField: start>, 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.
- member
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.parentis aForwardManyToOneDescriptorinstance.
- member_id
- membership_type
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>
- start
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class loefsys.members.models.StudyRegistration(*args, **kwargs)
Bases:
Model ExtensionsModel for members who are registered for a study.
- member
The member whom the study details belong to.
- Type:
LoefbijterMember
- 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_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_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.
- institution
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- member
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.placeis aForwardOneToOneDescriptorinstance.
- member_id
- 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>
- programme
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- rsc_number
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- student_number
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class loefsys.members.models.User(*args, **kwargs)
Bases:
AbstractBaseUser,Model Extensions,PermissionsMixinThe user model for authentication on the Loefbijter website.
A user account can be made for two use cases. First, when a member registers at Loefbijter, an account is made for them as it is necessary for them to interact with loefsys for their membership. Additionally, it is also possible that a user account is made for guests who need access to the site. This user model is used for both cases and the only difference in model values is that a member has a
- created
The timestamp of the creation of this model. Inherited from TimestampedModel.
- Type:
- modified
The timestamp of last modification of this model.
Inherited from TimestampedModel.
- Type:
- last_login
the timestamp of the last login for this user.
Inherited from AbstractBaseUser.
- Type:
- is_superuserbool
Flag that determines whether the user has all permissions without explicitly assigned
Inheristed from PermissionsMixin.
- groups~django.db.models.query.QuerySet of ~loefsys.groups.models.LoefbijterGroup
The groups that this user belongs to.
Inherited from PermissionsMixin.d. email : str The email of the user, used to log in. This value is unique.
- is_staffbool
Flag that determines whether has access to the admin site.
- first_namestr
The first name of the user.
- is_activebool
Flag that determines whether the member can log in with their account.
- last_namestr
The last name of the user.
- initialsstr
The initials of the user.
- is_superuserbool
Designated that this user is a superuser.
- nicknamestr
The nickname of the user, or blank if not applicable.
display_name_preference : has all permissions without explicit assignation. groups : ~django.db.models.query.QuerySet of ~loefsys.groups.models.LoefbijterGroup
The groups that this ~loefsys.users.models.choices.DisplayNamePreference The user’s preference of how they want their name to be displayed.
- user_permissions~django.db.models.query.QuerySet of ~django.contrib.auth.models.Permission
The specific permissions for this user.
- phone_numberstr
The phone number of the user.
For members, a phone number is required, and it is recommended for guest accounts too. However, it is possible that no phone number is available for ex-members, so the field should take into account empty values too.
picture : ~django.db.models.fields.files.ImageFieldFile note : str
A note field that are only visible to active board members.
For guest accounts, a note can provide information for which purpose this account exists. For members, incidents can potentially be tracked.
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- EMAIL_FIELD = 'email'
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- USERNAME_FIELD = 'email'
- 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.placeis aForwardOneToOneDescriptorinstance.
- address_id
- birthday
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- delete_profile_picture()
Delete the image file associated with the profile picture.
- display_name_preference
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- email
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- eventregistration_set
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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- feedtoken
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.restaurantis aReverseOneToOneDescriptorinstance.
- first_name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- gender
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_display_name_preference_display(*, field=<django.db.models.fields.PositiveSmallIntegerField: display_name_preference>)
- get_gender_display(*, field=<django.db.models.fields.PositiveSmallIntegerField: gender>)
- 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_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)
- groupmembership_set
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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- groups
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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- initials
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_active
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_staff
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_superuser
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_login
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- last_name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- logentry_set
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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- 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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- modified
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- nickname
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.
- objects = <loefsys.members.models.user.UserManager object>
- organizer
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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- password
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- phone_number
The descriptor for the phone number attribute on the model instance. Returns a PhoneNumber when accessed so you can do stuff like:
>>> instance.phone_number.as_international
Assigns a phone number object on assignment so you can do:
>>> instance.phone_number = PhoneNumber(...)
or,
>>> instance.phone_number = '+414204242'
- picture
Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.
- show_birthday
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- slug
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- 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.restaurantis aReverseOneToOneDescriptorinstance.
- user_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.toppingsandTopping.pizzasareManyToManyDescriptorinstances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
- user_picture_upload_path(_)
Return the upload path for the user profile picture.
- user_upload_directory()
Return the user upload directory.
Submodules
- loefsys.members.models.address module
AddressAddress.createdAddress.modifiedAddress.streetAddress.street2Address.postal_codeAddress.cityAddress.countryAddress.streetAddress.street2Address.postal_codeAddress.cityAddress.countryAddress.DoesNotExistAddress.MultipleObjectsReturnedAddress.createdAddress.get_next_by_created()Address.get_next_by_modified()Address.get_previous_by_created()Address.get_previous_by_modified()Address.idAddress.modifiedAddress.objectsAddress.user
- loefsys.members.models.choices module
- loefsys.members.models.membership module
MembershipMembership.memberMembership.membership_typeMembership.startMembership.endMembership.memberMembership.membership_typeMembership.startMembership.endMembership.clean()Membership.DoesNotExistMembership.MultipleObjectsReturnedMembership.get_membership_type_display()Membership.get_next_by_start()Membership.get_previous_by_start()Membership.idMembership.member_idMembership.objects
validate_has_overlap()
- loefsys.members.models.study_registration module
StudyRegistrationStudyRegistration.createdStudyRegistration.modifiedStudyRegistration.memberStudyRegistration.institutionStudyRegistration.programmeStudyRegistration.student_numberStudyRegistration.rsc_numberStudyRegistration.memberStudyRegistration.institutionStudyRegistration.programmeStudyRegistration.student_numberStudyRegistration.rsc_numberStudyRegistration.DoesNotExistStudyRegistration.MultipleObjectsReturnedStudyRegistration.createdStudyRegistration.get_next_by_created()StudyRegistration.get_next_by_modified()StudyRegistration.get_previous_by_created()StudyRegistration.get_previous_by_modified()StudyRegistration.idStudyRegistration.member_idStudyRegistration.modifiedStudyRegistration.objects
- loefsys.members.models.user module
UserManagerOverwriteStorageUserUser.createdUser.modifiedUser.passwordUser.last_loginUser.user_upload_directory()User.user_picture_upload_path()User.delete_profile_picture()User.emailUser.slugUser.is_staffUser.is_activeUser.first_nameUser.last_nameUser.initialsUser.nicknameUser.display_name_preferenceUser.pictureUser.genderUser.birthdayUser.show_birthdayUser.addressUser.study_registrationUser.membership_setUser.phone_numberUser.noteUser.EMAIL_FIELDUser.USERNAME_FIELDUser.objectsUser.full_nameUser.display_nameUser.DoesNotExistUser.MultipleObjectsReturnedUser.address_idUser.createdUser.eventregistration_setUser.feedtokenUser.get_display_name_preference_display()User.get_gender_display()User.get_next_by_created()User.get_next_by_modified()User.get_previous_by_created()User.get_previous_by_modified()User.groupmembership_setUser.groupsUser.idUser.is_superuserUser.last_loginUser.logentry_setUser.modifiedUser.organizerUser.passwordUser.user_permissions