accounts.models package¶
Module contents¶
Definition of the app’s models. For an illustration of the relationship between the different models, see the Overview.
Submodules¶
accounts.models.choices module¶
Subclasses of the ChoiceEnum
class used to represent
raw and human-readable values for choices within the accounts.models
module.
accounts.models.laboratory module¶
Definition of the Laboratory
model.
-
class
accounts.models.laboratory.
Laboratory
(*args, **kwargs)¶ Bases:
django_extensions.db.models.TitleDescriptionModel
,django_extensions.db.models.TimeStampedModel
A class to represents a research laboratory.
-
get_absolute_url
() → str¶ Returns the canonical URL for this instance.
References
Returns: URL Return type: str
-
image
¶ Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.
-
laboratorymembership_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.
-
members
¶ 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.
-
accounts.models.profile module¶
Definition of the Profile
model.
-
class
accounts.models.profile.
Profile
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
A user profile, associated to each user using a OneToOne relationship and created automatically usings signals.
References
-
bio
¶ Short user biography.
-
date_of_birth
¶ User’s date of birth.
-
get_absolute_url
() → str¶ Returns the canonical URL for this instance.
References
Returns: URL Return type: str
-
get_full_name
(include_title: bool = True) → str¶ Returns the full name of the user, including a title if any.
Parameters: include_title (bool, optional) – Whether to include title (academic credentials etc.) if specified Returns: User’s full name Return type: str
-
get_title_display
(*, field=<django.db.models.fields.CharField: title>)¶
-
get_title_repr
() → str¶ Returns the verbose title of the user as defined in the
Title
Enum.Returns: Verbose title representation Return type: str
-
image
¶ Profile image.
-
institute
¶ The institute to which a user belongs, if any.
-
title
¶ Academic or any other kind of title.
-
user
¶ OneToOne relationship with the user model.
-
accounts.models.user module¶
Definition of the User
model.
-
class
accounts.models.user.
User
(*args, **kwargs)¶ Bases:
django.contrib.auth.models.AbstractUser
Custom User model definition.
References
-
exportdestination_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
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.
-
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.
-
laboratory_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
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.
-
laboratorymembership_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.
-
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.
-
mri_uploads
¶ 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.
-
profile
¶ 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.
-
run_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.
-
study_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
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.
-