loefsys.users.models package
Module containing the models related to contacts and users.
- class loefsys.users.models.Address(*args, **kwargs)
Bases:
Model Extensions
Model 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:
- 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.
- postal_code
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- 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.
- 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.
- memberdetails
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 aReverseOneToOneDescriptor
instance.
- 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>
- class loefsys.users.models.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.
- gender
The gender of the person.
- Type:
Genders
- 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:
- 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:
- 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 aForwardOneToOneDescriptor
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 aForwardOneToOneDescriptor
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 aReverseOneToOneDescriptor
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 aReverseManyToOneDescriptor
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
- class loefsys.users.models.Membership(*args, **kwargs)
Bases:
Model
Model 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
- 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.parent
is aForwardManyToOneDescriptor
instance.
- membership_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- start
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- end
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- clean()
Run validation on the model.
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- 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_id
- objects = <django.db.models.manager.Manager object>
- class loefsys.users.models.StudyRegistration(*args, **kwargs)
Bases:
Model Extensions
Model for members who are registered for a study.
- member
The member whom the study details belong to.
- Type:
LoefbijterMember
- 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.place
is aForwardOneToOneDescriptor
instance.
- institution
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- programme
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.
- rsc_number
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_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.
- 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>
- class loefsys.users.models.User(*args, **kwargs)
Bases:
AbstractBaseUser
,PermissionsMixin
,NameMixin
,Model Extensions
The 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
- is_superuser
Designated that this user has all permissions without explicit assignation.
- Type:
- groups
The groups that this user belongs to.
- Type:
- user_permissions
The specific permissions for this user.
- Type:
- phone_number
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.
- Type:
- picture
- Type:
ImageFieldFile
- note
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.
- Type:
- user_upload_directory()
Return the user upload directory.
- user_picture_upload_path(_)
Return the upload path for the user profile picture.
- delete_profile_picture()
Delete the image file associated with the profile picture.
- email
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_active
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- 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.
- note
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- EMAIL_FIELD = 'email'
- USERNAME_FIELD = 'email'
- objects = <loefsys.users.models.user.UserManager object>
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- authorized_skippers
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- display_name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- 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.
- 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.children
is aReverseManyToOneDescriptor
instance.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.restaurant
is aReverseOneToOneDescriptor
instance.
- first_name
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_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.children
is aReverseManyToOneDescriptor
instance.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_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.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- member
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 aReverseOneToOneDescriptor
instance.
- 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.
- 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.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.
- reservee_user_reservation_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.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- skippers
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
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- 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.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- userlog_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.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- userskippership_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.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
Submodules
- loefsys.users.models.address module
Address
Address.created
Address.modified
Address.street
Address.street2
Address.postal_code
Address.city
Address.country
Address.street
Address.street2
Address.postal_code
Address.city
Address.country
Address.DoesNotExist
Address.MultipleObjectsReturned
Address.created
Address.get_next_by_created()
Address.get_next_by_modified()
Address.get_previous_by_created()
Address.get_previous_by_modified()
Address.id
Address.memberdetails
Address.modified
Address.objects
- loefsys.users.models.choices module
- loefsys.users.models.member module
MemberDetails
MemberDetails.user
MemberDetails.gender
MemberDetails.birthday
MemberDetails.show_birthday
MemberDetails.address
MemberDetails.study_registration
MemberDetails.membership_set
MemberDetails.user
MemberDetails.gender
MemberDetails.birthday
MemberDetails.show_birthday
MemberDetails.address
MemberDetails.study_registration
MemberDetails.membership_set
MemberDetails.DoesNotExist
MemberDetails.MultipleObjectsReturned
MemberDetails.address_id
MemberDetails.created
MemberDetails.get_gender_display()
MemberDetails.get_next_by_birthday()
MemberDetails.get_next_by_created()
MemberDetails.get_next_by_modified()
MemberDetails.get_previous_by_birthday()
MemberDetails.get_previous_by_created()
MemberDetails.get_previous_by_modified()
MemberDetails.modified
MemberDetails.objects
MemberDetails.user_id
- loefsys.users.models.membership module
Membership
Membership.member
Membership.membership_type
Membership.start
Membership.end
Membership.member
Membership.membership_type
Membership.start
Membership.end
Membership.clean()
Membership.DoesNotExist
Membership.MultipleObjectsReturned
Membership.get_membership_type_display()
Membership.get_next_by_start()
Membership.get_previous_by_start()
Membership.id
Membership.member_id
Membership.objects
validate_has_overlap()
- loefsys.users.models.name_mixin module
NameMixin
NameMixin.first_name
NameMixin.last_name
NameMixin.initials
NameMixin.nickname
NameMixin.display_name_preference
NameMixin.display_name
NameMixin.first_name
NameMixin.last_name
NameMixin.initials
NameMixin.nickname
NameMixin.display_name_preference
NameMixin.display_name
NameMixin.Meta
NameMixin.get_display_name_preference_display()
- loefsys.users.models.skippership module
- loefsys.users.models.study_registration module
StudyRegistration
StudyRegistration.created
StudyRegistration.modified
StudyRegistration.member
StudyRegistration.institution
StudyRegistration.programme
StudyRegistration.student_number
StudyRegistration.rsc_number
StudyRegistration.member
StudyRegistration.institution
StudyRegistration.programme
StudyRegistration.student_number
StudyRegistration.rsc_number
StudyRegistration.DoesNotExist
StudyRegistration.MultipleObjectsReturned
StudyRegistration.created
StudyRegistration.get_next_by_created()
StudyRegistration.get_next_by_modified()
StudyRegistration.get_previous_by_created()
StudyRegistration.get_previous_by_modified()
StudyRegistration.id
StudyRegistration.member_id
StudyRegistration.modified
StudyRegistration.objects
- loefsys.users.models.user module
UserManager
OverwriteStorage
User
User.created
User.modified
User.email
User.password
User.last_login
User.is_superuser
User.groups
User.user_permissions
User.phone_number
User.picture
User.note
User.user_upload_directory()
User.user_picture_upload_path()
User.delete_profile_picture()
User.email
User.is_staff
User.is_active
User.groups
User.phone_number
User.picture
User.note
User.EMAIL_FIELD
User.USERNAME_FIELD
User.objects
User.DoesNotExist
User.MultipleObjectsReturned
User.authorized_skippers
User.created
User.display_name
User.display_name_preference
User.eventregistration_set
User.feedtoken
User.first_name
User.get_display_name_preference_display()
User.get_next_by_created()
User.get_next_by_modified()
User.get_previous_by_created()
User.get_previous_by_modified()
User.groupmembership_set
User.id
User.initials
User.is_superuser
User.last_login
User.last_name
User.logentry_set
User.member
User.modified
User.nickname
User.organizer
User.password
User.reservee_user_reservation_set
User.skippers
User.user_permissions
User.userlog_set
User.userskippership_set
- loefsys.users.models.user_skippership module
UserSkippership
UserSkippership.user
UserSkippership.skippership
UserSkippership.since
UserSkippership.given_by
UserSkippership.user
UserSkippership.skippership
UserSkippership.since
UserSkippership.given_by
UserSkippership.DoesNotExist
UserSkippership.MultipleObjectsReturned
UserSkippership.authorized_skipper_reservation_set
UserSkippership.get_next_by_since()
UserSkippership.get_previous_by_since()
UserSkippership.id
UserSkippership.objects
UserSkippership.skippership_id
UserSkippership.user_id