Modèle AdminProfile

class users.models.admin.AdminProfile(*args, **kwargs)

Bases : Model

Modèle représentant le profil d’un administrateur.

Ce profil est lié à un utilisateur via une relation OneToOne et contient des informations supplémentaires propres aux administrateurs.

Variables:
  • user (User) – L’utilisateur associé au profil admin

  • nom (str) – Nom de famille de l’administrateur

  • prenom (str) – Prénom de l’administrateur

  • matricule (str) – Identifiant unique de l’administrateur

user

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

nom

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

prenom

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

matricule

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

exception DoesNotExist

Bases : ObjectDoesNotExist

exception MultipleObjectsReturned

Bases : MultipleObjectsReturned

id

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

objects = <django.db.models.manager.Manager object>
user_id