apps.api.models.user module¶
-
class
apps.api.models.user.
User
(*args, **kwargs)¶ Bases:
django.contrib.auth.models.AbstractUser
Yeah, there’s a built-in User model for authentication in Django. However it is “highly recommended” to use a custom user model, because updating this custom model is quite easy compared to updating the default User model which is quite a PITA. @see https://docs.djangoproject.com/en/3.0/topics/auth/customizing/
#using-a-custom-user-model-when-starting-a-project
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
get_next_by_date_joined
(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=True, **kwargs)¶
-
get_previous_by_date_joined
(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=False, **kwargs)¶
-
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.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
info
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
is_creator
¶
-
settings
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.
-
exception