loefsys.users.models.name_mixin module

Module containing a utility mixin for handling names of persons.

class loefsys.users.models.name_mixin.NameMixin(*args, **kwargs)

Bases: Model

A mixin for dealing with names.

first_name

The first name of the person.

Type:

str

last_name

The last name of the person.

Type:

str

initials

The initials of the person.

Type:

str

nickname

The nickname of the person, or an empty string if not applicable.

Type:

str

display_name_preference

The person’s preference for having their name displayed.

Type:

DisplayNamePreference

display_name

A generated value of the person’s name according to their preference.

Type:

str

first_name

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.

initials

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.

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.

display_name

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

class Meta

Bases: object

abstract = False
get_display_name_preference_display(*, field=<django.db.models.fields.PositiveSmallIntegerField: display_name_preference>)