moo.core.models.auth.Player

class moo.core.models.auth.Player(*args, **kwargs)

The durable account record behind an avatar.

A Player row is the first-class accountability anchor: its pk is a stable account id distinct from any avatar name, and moderation (provenance, gag, suspend, ban) keys to it rather than to a discardable avatar Object. Today a row carries a single avatar; the model is written so one account can later own several deliberately linked avatars without the safety set being retrofitted.

__init__(*args, **kwargs)

Methods

__init__(*args, **kwargs)

adelete([using, keep_parents])

arefresh_from_db([using, fields])

asave([force_insert, force_update, using, ...])

check(**kwargs)

clean()

Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields.

clean_fields([exclude])

Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur.

date_error_message(lookup_type, field_name, ...)

delete(*args, **kwargs)

from_db(db, field_names, values)

full_clean([exclude, validate_unique, ...])

Call clean_fields(), clean(), validate_unique(), and validate_constraints() on the model.

get_constraints()

get_deferred_fields()

Return a set containing names of deferred fields for this instance.

get_status_display(*[, field])

is_registered()

True once a durable identity has been bound (J).

is_suspended([now])

True while a reversible suspension is in force.

login_blocked_reason([now])

Return a human-readable reason login is blocked, or None if allowed.

prepare_database_save(field)

refresh_from_db([using, fields])

Reload field values from the database.

save(*args, **kwargs)

Save the current instance.

save_base([raw, force_insert, force_update, ...])

Handle the parts of saving which should be done only once per save, yet need to be done in raw saves, too.

serializable_value(field_name)

Return the value of the field name for this instance.

unique_error_message(model_class, unique_check)

validate_constraints([exclude])

validate_unique([exclude])

Check unique constraints on the model and raise ValidationError if any failed.

Attributes

STATUS_ACTIVE

STATUS_BANNED

STATUS_CHOICES

STATUS_GUEST

STATUS_SUSPENDED

account_id

The stable account identifier (the row pk), distinct from any name.

auditlog_set

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

avatar

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

avatar_id

id

A wrapper for a deferred-loading field.

objects

pk

registered_identity

A wrapper for a deferred-loading field.

site

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

site_id

status

A wrapper for a deferred-loading field.

suspended_until

A wrapper for a deferred-loading field.

user

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

user_id

wizard

A wrapper for a deferred-loading field.