class User(AbstractUser):
Users within the Django authentication system are represented by this model.
Username and password are required. Other fields are optional.
Class | Meta |
Undocumented |
Inherited from AbstractUser
:
Method | clean |
No summary |
Constant | EMAIL_FIELD |
Undocumented |
Constant | REQUIRED_FIELDS |
Undocumented |
Constant | USERNAME_FIELD |
Undocumented |
Method | email_user |
Send an email to this user. |
Method | get_full_name |
Return the first_name plus the last_name, with a space in between. |
Method | get_short_name |
Return the short name for the user. |
Class Variable | date_joined |
Undocumented |
Class Variable | first_name |
Undocumented |
Class Variable | is_active |
Undocumented |
Class Variable | is_staff |
Undocumented |
Class Variable | last_name |
Undocumented |
Class Variable | objects |
Undocumented |
Class Variable | username |
Undocumented |
Class Variable | username_validator |
Undocumented |
Instance Variable | email |
Undocumented |
Inherited from AbstractBaseUser
(via AbstractUser
):
Class Method | get_email_field_name |
Undocumented |
Class Method | normalize_username |
Undocumented |
Method | __str__ |
Undocumented |
Method | check_password |
Return a boolean of whether the raw_password was correct. Handles hashing formats behind the scenes. |
Method | get_session_auth_hash |
Return an HMAC of the password field. |
Method | get_username |
Return the username for this User. |
Method | has_usable_password |
Return False if set_unusable_password() has been called for this user. |
Method | natural_key |
Undocumented |
Method | save |
Save the current instance. Override this in a subclass if you want to control the saving process. |
Method | set_password |
Undocumented |
Method | set_unusable_password |
Undocumented |
Class Variable | last_login |
Undocumented |
Instance Variable | _password |
Undocumented |
Instance Variable | password |
Undocumented |
Property | is_anonymous |
Always return False. This is a way of comparing User objects to anonymous users. |
Property | is_authenticated |
Always return True. This is a way to tell if the user has been authenticated in templates. |
Inherited from Model
(via AbstractUser
, AbstractBaseUser
):
Class Method | check |
Undocumented |
Class Method | from_db |
Undocumented |
Class Method | _check_column_name_clashes |
Undocumented |
Class Method | _check_constraints |
Undocumented |
Class Method | _check_default_pk |
Undocumented |
Class Method | _check_field_name_clashes |
Forbid field shadowing in multi-table inheritance. |
Class Method | _check_fields |
Perform all field checks. |
Class Method | _check_id_field |
Check if id field is a primary key. |
Class Method | _check_index_together |
Check the value of "index_together" option. |
Class Method | _check_indexes |
Check fields, names, and conditions of indexes. |
Class Method | _check_local_fields |
Undocumented |
Class Method | _check_long_column_names |
Check that any auto-generated column names are shorter than the limits for each database in which the model will be created. |
Class Method | _check_m2m_through_same_relationship |
Check if no relationship model is used by more than one m2m field. |
Class Method | _check_managers |
Perform all manager checks. |
Class Method | _check_model |
Undocumented |
Class Method | _check_model_name_db_lookup_clashes |
Undocumented |
Class Method | _check_ordering |
Check "ordering" option -- is it a list of strings and do all fields exist? |
Class Method | _check_property_name_related_field_accessor_clashes |
Undocumented |
Class Method | _check_single_primary_key |
Undocumented |
Class Method | _check_swappable |
Check if the swapped model exists. |
Class Method | _check_unique_together |
Check the value of "unique_together" option. |
Class Method | _get_expr_references |
Undocumented |
Method | __eq__ |
Undocumented |
Method | __getstate__ |
Hook to allow choosing the attributes to pickle. |
Method | __hash__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __reduce__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __setstate__ |
Undocumented |
Method | _do_insert |
Do an INSERT. If returning_fields is defined then this method should return the newly created data for the model. |
Method | _do_update |
Try to update the model. Return True if the model was updated (if an update query was done and a matching row was found in the DB). |
Method | _get_FIELD_display |
Undocumented |
Method | _get_next_or_previous_by_FIELD |
Undocumented |
Method | _get_next_or_previous_in_order |
Undocumented |
Method | _get_pk_val |
Undocumented |
Method | _get_unique_checks |
No summary |
Method | _perform_date_checks |
Undocumented |
Method | _perform_unique_checks |
Undocumented |
Method | _prepare_related_fields_for_save |
Undocumented |
Method | _save_parents |
Save all the parents of cls using values from self. |
Method | _save_table |
Do the heavy-lifting involved in saving. Update or insert the data for a single table. |
Method | _set_pk_val |
Undocumented |
Method | clean_fields |
Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur. |
Method | date_error_message |
Undocumented |
Method | delete |
Undocumented |
Method | full_clean |
Call clean_fields(), clean(), and validate_unique() on the model. Raise a ValidationError for any errors that occur. |
Method | get_deferred_fields |
Return a set containing names of deferred fields for this instance. |
Method | prepare_database_save |
Undocumented |
Method | refresh_from_db |
Reload field values from the database. |
Method | save_base |
Handle the parts of saving which should be done only once per save, yet need to be done in raw saves, too. This includes some sanity checks and signal sending. |
Method | serializable_value |
No summary |
Method | unique_error_message |
Undocumented |
Method | validate_unique |
Check unique constraints on the model and raise ValidationError if any failed. |
Class Variable | pk |
Undocumented |
Instance Variable | _order |
Undocumented |
Instance Variable | _prefetched_objects_cache |
Undocumented |
Instance Variable | _state |
Undocumented |
Inherited from PermissionsMixin
(via AbstractUser
):
Method | get_all_permissions |
Undocumented |
Method | get_group_permissions |
Return a list of permission strings that this user has through their groups. Query all available auth backends. If an object is passed in, return only permissions matching this object. |
Method | get_user_permissions |
Return a list of permission strings that this user has directly. Query all available auth backends. If an object is passed in, return only permissions matching this object. |
Method | has_module_perms |
Return True if the user has any permissions in the given app label. Use similar logic as has_perm(), above. |
Method | has_perm |
No summary |
Method | has_perms |
Return True if the user has each of the specified permissions. If object is passed, check if the user has all required perms for it. |
Class Variable | is_superuser |
Undocumented |
Class Variable | groups |
Undocumented |
Class Variable | user_permissions |
Undocumented |
Inherited from Model
(via AbstractUser
, PermissionsMixin
):
Class Method | check |
Undocumented |
Class Method | from_db |
Undocumented |
Class Method | _check_column_name_clashes |
Undocumented |
Class Method | _check_constraints |
Undocumented |
Class Method | _check_default_pk |
Undocumented |
Class Method | _check_field_name_clashes |
Forbid field shadowing in multi-table inheritance. |
Class Method | _check_fields |
Perform all field checks. |
Class Method | _check_id_field |
Check if id field is a primary key. |
Class Method | _check_index_together |
Check the value of "index_together" option. |
Class Method | _check_indexes |
Check fields, names, and conditions of indexes. |
Class Method | _check_local_fields |
Undocumented |
Class Method | _check_long_column_names |
Check that any auto-generated column names are shorter than the limits for each database in which the model will be created. |
Class Method | _check_m2m_through_same_relationship |
Check if no relationship model is used by more than one m2m field. |
Class Method | _check_managers |
Perform all manager checks. |
Class Method | _check_model |
Undocumented |
Class Method | _check_model_name_db_lookup_clashes |
Undocumented |
Class Method | _check_ordering |
Check "ordering" option -- is it a list of strings and do all fields exist? |
Class Method | _check_property_name_related_field_accessor_clashes |
Undocumented |
Class Method | _check_single_primary_key |
Undocumented |
Class Method | _check_swappable |
Check if the swapped model exists. |
Class Method | _check_unique_together |
Check the value of "unique_together" option. |
Class Method | _get_expr_references |
Undocumented |
Method | __eq__ |
Undocumented |
Method | __getstate__ |
Hook to allow choosing the attributes to pickle. |
Method | __hash__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __reduce__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __setstate__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | _do_insert |
Do an INSERT. If returning_fields is defined then this method should return the newly created data for the model. |
Method | _do_update |
Try to update the model. Return True if the model was updated (if an update query was done and a matching row was found in the DB). |
Method | _get_FIELD_display |
Undocumented |
Method | _get_next_or_previous_by_FIELD |
Undocumented |
Method | _get_next_or_previous_in_order |
Undocumented |
Method | _get_pk_val |
Undocumented |
Method | _get_unique_checks |
No summary |
Method | _perform_date_checks |
Undocumented |
Method | _perform_unique_checks |
Undocumented |
Method | _prepare_related_fields_for_save |
Undocumented |
Method | _save_parents |
Save all the parents of cls using values from self. |
Method | _save_table |
Do the heavy-lifting involved in saving. Update or insert the data for a single table. |
Method | _set_pk_val |
Undocumented |
Method | clean_fields |
Clean all fields and raise a ValidationError containing a dict of all validation errors if any occur. |
Method | date_error_message |
Undocumented |
Method | delete |
Undocumented |
Method | full_clean |
Call clean_fields(), clean(), and validate_unique() on the model. Raise a ValidationError for any errors that occur. |
Method | get_deferred_fields |
Return a set containing names of deferred fields for this instance. |
Method | prepare_database_save |
Undocumented |
Method | refresh_from_db |
Reload field values from the database. |
Method | save |
Save the current instance. Override this in a subclass if you want to control the saving process. |
Method | save_base |
Handle the parts of saving which should be done only once per save, yet need to be done in raw saves, too. This includes some sanity checks and signal sending. |
Method | serializable_value |
No summary |
Method | unique_error_message |
Undocumented |
Method | validate_unique |
Check unique constraints on the model and raise ValidationError if any failed. |
Class Variable | pk |
Undocumented |
Instance Variable | _order |
Undocumented |
Instance Variable | _prefetched_objects_cache |
Undocumented |
Instance Variable | _state |
Undocumented |