Référence backend

Modèles

class api.models.UserStatus(value)[source]

Bases : TextChoices

Allowed lifecycle states for application accounts.

ACTIVE = 'actif'
SUSPENDED = 'suspendu'
ARCHIVED = 'archive'
class api.models.ConsentType(value)[source]

Bases : TextChoices

Consent categories tracked for accountability.

CGU = 'cgu'
PRIVACY = 'politique_confidentialite'
NOTIFICATIONS = 'notifications'
class api.models.ConsentStatus(value)[source]

Bases : TextChoices

Allowed consent decisions stored in the consent history.

ACCEPTED = 'accepte'
REFUSED = 'refuse'
class api.models.SecurityLogStatus(value)[source]

Bases : TextChoices

Outcome values for security audit events.

SUCCESS = 'success'
FAILURE = 'failure'
class api.models.StationStatus(value)[source]

Bases : TextChoices

Operational lifecycle values for a charging station.

ACTIVE = 'active'
MAINTENANCE = 'maintenance'
INACTIVE = 'inactive'
class api.models.BorneStatus(value)[source]

Bases : TextChoices

Operational lifecycle values for one physical kiosk/charging cabinet.

ACTIVE = 'active'
MAINTENANCE = 'maintenance'
INACTIVE = 'inactive'
class api.models.EmplacementStatus(value)[source]

Bases : TextChoices

Availability values for one charging bay.

AVAILABLE = 'disponible'
RESERVED = 'reserve'
OCCUPIED = 'occupe'
MAINTENANCE = 'maintenance'
class api.models.LockState(value)[source]

Bases : TextChoices

Physical lock states reported or controlled by the station.

LOCKED = 'verrouille'
UNLOCKED = 'deverrouille'
BLOCKED = 'bloque'
class api.models.ReservationAuthChoice(value)[source]

Bases : TextChoices

Authentication modes available for a reservation.

RFID = 'rfid'
QR = 'qr'
CODE = 'code'
class api.models.ReservationStatus(value)[source]

Bases : TextChoices

Lifecycle values for reservations.

PENDING = 'en_attente'
CONFIRMED = 'confirmee'
ACTIVE = 'active'
CANCELLED = 'annulee'
COMPLETED = 'terminee'
class api.models.ChargeSessionState(value)[source]

Bases : TextChoices

Backend lifecycle values for one effective charging session.

RESERVED = 'reserved'
ACCESS_VALIDATED = 'access_validated'
WAITING_PLUG = 'waiting_plug'
CHARGING = 'charging'
STOPPING = 'stopping'
STOPPED = 'stopped'
ERROR = 'error'
class api.models.DeviceType(value)[source]

Bases : TextChoices

Supported embedded device families.

ESP32 = 'ESP32'
class api.models.DeviceStatus(value)[source]

Bases : TextChoices

Last business state received from an embedded device.

PROVISIONED = 'provisioned'
ONLINE = 'online'
IDLE = 'idle'
OFFLINE = 'offline'
CHARGING = 'charging'
ERROR = 'error'
class api.models.FirmwareUpdateStatus(value)[source]

Bases : TextChoices

Lifecycle values for firmware compliance and OTA preparation.

UNKNOWN = 'unknown'
UP_TO_DATE = 'up_to_date'
UPDATE_REQUIRED = 'update_required'
UPDATE_SCHEDULED = 'update_scheduled'
UPDATING = 'updating'
FAILED = 'failed'
class api.models.AlertSeverity(value)[source]

Bases : TextChoices

Severity scale used by operational alerts.

LOW = 'basse'
MEDIUM = 'moyenne'
HIGH = 'haute'
CRITICAL = 'critical'
CRITIQUE = 'critique'
class api.models.AlertStatus(value)[source]

Bases : TextChoices

Lifecycle values for operational alerts.

NEW = 'nouvelle'
ACTIVE = 'active'
IN_PROGRESS = 'prise_en_charge'
RESOLVED = 'resolue'
CLOSED = 'closed'
FERMEE = 'fermee'
class api.models.MaintenanceStatus(value)[source]

Bases : TextChoices

Lifecycle values for maintenance interventions.

PLANNED = 'planifiee'
IN_PROGRESS = 'en_cours'
DONE = 'realisee'
CANCELLED = 'annulee'
class api.models.TechnicianStationRole(value)[source]

Bases : TextChoices

Operational responsibility levels for a technician on one station.

REFERENT = 'referent'
INTERVENANT = 'intervenant'
OBSERVATEUR = 'observateur'
class api.models.UtilisateurManager(*args, **kwargs)[source]

Bases : BaseUserManager

Create and look up users with the pseudo as the login identifier.

use_in_migrations = True

If set to True the manager will be serialized into migrations and will thus be available in e.g. RunPython operations.

get_by_natural_key(pseudo)[source]

Return the user matching Django’s configured natural key.

create_user(pseudo, email, password=None, **extra_fields)[source]

Create a regular user with normalized email and hashed password.

create_superuser(pseudo, email, password=None, **extra_fields)[source]

Create an administrator account with all required staff flags.

class api.models.Utilisateur(*args, **kwargs)[source]

Bases : AbstractBaseUser, PermissionsMixin

Represent an application account authenticated by pseudo and email.

id_user

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

pseudo

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

email

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

statut

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

created_at

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

failed_attempts

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

is_active

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

is_staff

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

date_joined

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

objects = <api.models.UtilisateurManager object>
USERNAME_FIELD = 'pseudo'
EMAIL_FIELD = 'email'
REQUIRED_FIELDS = ['email']
exception DoesNotExist

Bases : ObjectDoesNotExist

exception MultipleObjectsReturned

Bases : MultipleObjectsReturned

authentifications

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

consentements

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_next_by_date_joined(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_previous_by_date_joined(*, field=<django.db.models.fields.DateTimeField: date_joined>, is_next=False, **kwargs)
get_statut_display(*, field=<django.db.models.fields.CharField: statut>)
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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

is_superuser

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

journaux_securite

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

last_login

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

logentry_set

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

password

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

profil

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

In the example:

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

Place.restaurant is a ReverseOneToOneDescriptor instance.

reservations

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

technicien_profile

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

In the example:

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

Place.restaurant is a ReverseOneToOneDescriptor instance.

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 and Topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

utilisateurrole_set

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class api.models.ProfilUtilisateur(*args, **kwargs)[source]

Bases : Model

Store personal profile details that extend the authentication account.

id_profil

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

utilisateur

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.

telephone

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

telephone_verifie

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

objects = <django.db.models.manager.Manager object>
utilisateur_id
class api.models.Role(*args, **kwargs)[source]

Bases : Model

Describe an application role that can be assigned to users.

id_role

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

nom

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

description

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

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

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class api.models.UtilisateurRole(*args, **kwargs)[source]

Bases : Model

Link a user to a role with the assignment timestamp.

utilisateur

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

role

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

assigned_at

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

get_next_by_assigned_at(*, field=<django.db.models.fields.DateTimeField: assigned_at>, is_next=True, **kwargs)
get_previous_by_assigned_at(*, field=<django.db.models.fields.DateTimeField: assigned_at>, is_next=False, **kwargs)
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>
role_id
utilisateur_id
class api.models.Consentement(*args, **kwargs)[source]

Bases : Model

Record a user’s consent state for a specific policy or data use.

id_consentement

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

utilisateur

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

type

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

statut

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

date_consentement

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

get_next_by_date_consentement(*, field=<django.db.models.fields.DateTimeField: date_consentement>, is_next=True, **kwargs)
get_previous_by_date_consentement(*, field=<django.db.models.fields.DateTimeField: date_consentement>, is_next=False, **kwargs)
get_statut_display(*, field=<django.db.models.fields.CharField: statut>)
get_type_display(*, field=<django.db.models.fields.CharField: type>)
objects = <django.db.models.manager.Manager object>
utilisateur_id
class api.models.JournalSecurite(*args, **kwargs)[source]

Bases : Model

Store security audit events associated with user activity.

id_log

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

utilisateur

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

action

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

ip

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

statut

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

date_action

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

get_next_by_date_action(*, field=<django.db.models.fields.DateTimeField: date_action>, is_next=True, **kwargs)
get_previous_by_date_action(*, field=<django.db.models.fields.DateTimeField: date_action>, is_next=False, **kwargs)
get_statut_display(*, field=<django.db.models.fields.CharField: statut>)
objects = <django.db.models.manager.Manager object>
utilisateur_id
class api.models.TypeAuth(*args, **kwargs)[source]

Bases : Model

Define a supported authentication method and its assurance level.

id_type

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

libelle

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

factor_level

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

authentifications

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>
class api.models.Authentification(*args, **kwargs)[source]

Bases : Model

Store a reusable or temporary credential linked to a user.

id_auth

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

utilisateur

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

type_auth

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

hash_valeur

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

display_value

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

metadata

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

expiration

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

is_active

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

created_at

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

get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
objects = <django.db.models.manager.Manager object>
reservations

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

type_auth_id
utilisateur_id
class api.models.Station(*args, **kwargs)[source]

Bases : Model

Represent a physical charging station and its public location data.

id_station

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

nom

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

localisation_text

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

latitude

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

longitude

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

statut

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

created_at

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

bornes

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

emplacements

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_statut_display(*, field=<django.db.models.fields.CharField: statut>)
maintenances

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class api.models.Borne(*args, **kwargs)[source]

Bases : Model

Represent one physical charging cabinet attached to a station.

id_borne

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

station

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

numero

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

nom

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

mqtt_prefix

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

statut

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

created_at

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

classmethod default_for_station(station)[source]

Return the default cabinet used by compatibility flows.

exception DoesNotExist

Bases : ObjectDoesNotExist

exception MultipleObjectsReturned

Bases : MultipleObjectsReturned

emplacements

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)
get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)
get_statut_display(*, field=<django.db.models.fields.CharField: statut>)
objects = <django.db.models.manager.Manager object>
station_id
class api.models.Emplacement(*args, **kwargs)[source]

Bases : Model

Represent a numbered charging bay within a physical cabinet.

id_emplacement

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

station

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

borne

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

numero

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

statut

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

lock_state

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

save(*args, **kwargs)[source]

Keep the denormalized station field aligned with the parent cabinet.

exception DoesNotExist

Bases : ObjectDoesNotExist

exception MultipleObjectsReturned

Bases : MultipleObjectsReturned

borne_id
device

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

In the example:

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

Place.restaurant is a ReverseOneToOneDescriptor instance.

get_lock_state_display(*, field=<django.db.models.fields.CharField: lock_state>)
get_statut_display(*, field=<django.db.models.fields.CharField: statut>)
objects = <django.db.models.manager.Manager object>
reservations

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

sessions

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

station_id
class api.models.Reservation(*args, **kwargs)[source]

Bases : Model

Reserve a charging bay for one user and one authentication method.

id_reservation

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

reference_code

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

utilisateur

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

emplacement

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

authentification

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

auth_choice

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

date_debut

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

date_fin

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

statut

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

authentification_id
emplacement_id
get_auth_choice_display(*, field=<django.db.models.fields.CharField: auth_choice>)
get_next_by_date_debut(*, field=<django.db.models.fields.DateTimeField: date_debut>, is_next=True, **kwargs)
get_next_by_date_fin(*, field=<django.db.models.fields.DateTimeField: date_fin>, is_next=True, **kwargs)
get_previous_by_date_debut(*, field=<django.db.models.fields.DateTimeField: date_debut>, is_next=False, **kwargs)
get_previous_by_date_fin(*, field=<django.db.models.fields.DateTimeField: date_fin>, is_next=False, **kwargs)
get_statut_display(*, field=<django.db.models.fields.CharField: statut>)
objects = <django.db.models.manager.Manager object>
session

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

In the example:

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

Place.restaurant is a ReverseOneToOneDescriptor instance.

utilisateur_id
class api.models.Session(*args, **kwargs)[source]

Bases : Model

Track the effective charging session opened from a reservation.

id_session

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

reservation

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.

emplacement

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

start_time

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

end_time

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

charge_state

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

charge_state_updated_at

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

alertes

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

device_command_logs

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

emplacement_id
get_charge_state_display(*, field=<django.db.models.fields.CharField: charge_state>)
get_next_by_charge_state_updated_at(*, field=<django.db.models.fields.DateTimeField: charge_state_updated_at>, is_next=True, **kwargs)
get_next_by_start_time(*, field=<django.db.models.fields.DateTimeField: start_time>, is_next=True, **kwargs)
get_previous_by_charge_state_updated_at(*, field=<django.db.models.fields.DateTimeField: charge_state_updated_at>, is_next=False, **kwargs)
get_previous_by_start_time(*, field=<django.db.models.fields.DateTimeField: start_time>, is_next=False, **kwargs)
objects = <django.db.models.manager.Manager object>
reservation_id
telemetries

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class api.models.SessionTelemetry(*args, **kwargs)[source]

Bases : Model

Store electrical telemetry samples collected during a charging session.

id_telemetry

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

session

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

courant

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

tension

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

energie_kwh

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

timestamp

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

get_next_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)
get_previous_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=False, **kwargs)
objects = <django.db.models.manager.Manager object>
session_id
class api.models.Device(*args, **kwargs)[source]

Bases : Model

Describe the embedded device installed on a charging bay.

id_device

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

emplacement

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.

type_device

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

firmware_version

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

expected_firmware_version

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

firmware_update_status

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

ota_update_url

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

ota_target_version

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

ota_requested_at

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

ota_completed_at

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

ota_last_error

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

ip_address

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

slot_id

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

hardware_mac

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

mac_address

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

last_seen

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

status

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

last_command_id

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

last_command_action

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

last_command_status

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

last_command_message

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

last_command_at

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

capteurs

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

command_logs

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

emplacement_id
get_firmware_update_status_display(*, field=<django.db.models.fields.CharField: firmware_update_status>)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
get_type_device_display(*, field=<django.db.models.fields.CharField: type_device>)
objects = <django.db.models.manager.Manager object>
class api.models.DeviceCommandLog(*args, **kwargs)[source]

Bases : Model

Store command acknowledgements received from embedded devices.

id_command

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

device

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

session

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

command_id

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

action

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

status

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

message

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

source

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

payload

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

timestamp

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

device_id
get_next_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)
get_previous_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=False, **kwargs)
objects = <django.db.models.manager.Manager object>
session_id
class api.models.Capteur(*args, **kwargs)[source]

Bases : Model

Represent a sensor attached to an embedded charging device.

id_capteur

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

device

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

type

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

unite

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

device_id
donnees

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>
class api.models.CapteurData(*args, **kwargs)[source]

Bases : Model

Store one timestamped value produced by a sensor.

id_data

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

capteur

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

valeur

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

timestamp

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

alertes

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

capteur_id
get_next_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)
get_previous_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=False, **kwargs)
objects = <django.db.models.manager.Manager object>
class api.models.Alerte(*args, **kwargs)[source]

Bases : Model

Capture an operational alert raised from telemetry or a session.

id_alerte

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

data

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

session

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

type

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

message

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

niveau_severite

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

status

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

timestamp

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

first_seen

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

last_seen

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

notified_at

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

notification_count

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

assigned_technician

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

acknowledged_by

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

acknowledged_at

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

resolved_by

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

resolved_at

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

resolution_note

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

acknowledged_by_id
assigned_technician_id
data_id
get_next_by_first_seen(*, field=<django.db.models.fields.DateTimeField: first_seen>, is_next=True, **kwargs)
get_next_by_last_seen(*, field=<django.db.models.fields.DateTimeField: last_seen>, is_next=True, **kwargs)
get_next_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)
get_niveau_severite_display(*, field=<django.db.models.fields.CharField: niveau_severite>)
get_previous_by_first_seen(*, field=<django.db.models.fields.DateTimeField: first_seen>, is_next=False, **kwargs)
get_previous_by_last_seen(*, field=<django.db.models.fields.DateTimeField: last_seen>, is_next=False, **kwargs)
get_previous_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
objects = <django.db.models.manager.Manager object>
resolved_by_id
session_id
class api.models.Technicien(*args, **kwargs)[source]

Bases : Model

Represent a maintenance technician optionally linked to a user account.

id_technicien

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

utilisateur

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.

email

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

telephone

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

acknowledged_alerts

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

assigned_alerts

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

maintenances

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

station_assignments

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

utilisateur_id
class api.models.TechnicienStation(*args, **kwargs)[source]

Bases : Model

Limit a technician’s operational scope to assigned stations.

id_assignment

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

technicien

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

station

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

role

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

is_active

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

assigned_at

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

get_next_by_assigned_at(*, field=<django.db.models.fields.DateTimeField: assigned_at>, is_next=True, **kwargs)
get_previous_by_assigned_at(*, field=<django.db.models.fields.DateTimeField: assigned_at>, is_next=False, **kwargs)
get_role_display(*, field=<django.db.models.fields.CharField: role>)
objects = <django.db.models.manager.Manager object>
station_id
technicien_id
class api.models.Maintenance(*args, **kwargs)[source]

Bases : Model

Plan and track a maintenance intervention on a station.

id_maintenance

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

station

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

technicien

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

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

type

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

description

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

status

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

date_planifiee

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

date_realisee

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

get_next_by_date_planifiee(*, field=<django.db.models.fields.DateTimeField: date_planifiee>, is_next=True, **kwargs)
get_previous_by_date_planifiee(*, field=<django.db.models.fields.DateTimeField: date_planifiee>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
objects = <django.db.models.manager.Manager object>
station_id
technicien_id

Serializers

class api.serializers.RegisterSerializer(*args, **kwargs)[source]

Bases : ModelSerializer

Validate and create accounts from the public registration endpoint.

class Meta[source]

Bases : object

model

alias de Utilisateur

fields = ('pseudo', 'email', 'telephone', 'statut', 'password', 'cgu_accepted', 'privacy_policy_accepted', 'notifications_accepted')
extra_kwargs = {'statut': {'required': False}, 'telephone': {'allow_blank': True, 'required': False}}
validate_cgu_accepted(value)[source]

Require explicit acceptance of the terms before account creation.

validate_privacy_policy_accepted(value)[source]

Require explicit acknowledgement of the privacy policy.

validate_pseudo(value)[source]

Normalize and ensure pseudo uniqueness.

validate_email(value)[source]

Normalize and ensure email uniqueness.

validate_password(value)[source]

Apply the project’s password complexity rules.

create(validated_data)[source]

Create a user account and its profile in one transaction.

class api.serializers.ProfileSerializer(*args, **kwargs)[source]

Bases : ModelSerializer

Serialize editable account and profile fields for the current user.

class Meta[source]

Bases : object

model

alias de Utilisateur

fields = ('id_user', 'pseudo', 'email', 'telephone', 'telephone_verifie', 'statut', 'nom', 'is_staff', 'is_superuser')
extra_kwargs = {'is_staff': {'read_only': True}, 'is_superuser': {'read_only': True}, 'statut': {'required': False}, 'telephone': {'allow_blank': True, 'required': False}}
update(instance, validated_data)[source]

Update the user and synchronize the linked profile fields.

get_telephone_verifie(obj)[source]

Return whether the current profile phone number is verified.

Type renvoyé:

bool

class api.serializers.AdminUserUpdateSerializer(*args, **kwargs)[source]

Bases : ProfileSerializer

Expose administrative user fields while reusing profile synchronization.

class Meta[source]

Bases : Meta

fields = ('id_user', 'pseudo', 'email', 'telephone', 'telephone_verifie', 'statut', 'nom', 'is_active', 'is_staff', 'is_superuser')
extra_kwargs = {'is_active': {'required': False}, 'is_staff': {'required': False}, 'is_superuser': {'required': False}, 'statut': {'required': False}, 'telephone': {'allow_blank': True, 'required': False}}
update(instance, validated_data)[source]

Update user flags and profile fields from the admin API.

class api.serializers.PasswordChangeSerializer(*args, **kwargs)[source]

Bases : Serializer

Validate the payload used to change an authenticated user’s password.

validate(attrs)[source]

Ensure the new password and confirmation match.

class api.serializers.ConsentPreferenceSerializer(*args, **kwargs)[source]

Bases : Serializer

Validate editable consent preferences from the user profile.

class api.serializers.AdminUserSerializer(*args, **kwargs)[source]

Bases : ModelSerializer

Serialize user records for administrative list and detail views.

class Meta[source]

Bases : object

model

alias de Utilisateur

fields = ('id_user', 'pseudo', 'email', 'telephone', 'telephone_verifie', 'statut', 'is_active', 'is_staff', 'is_superuser', 'last_login', 'date_joined', 'nom', 'is_technician')
get_nom(obj)[source]

Return the display name stored on the related profile.

get_telephone(obj)[source]

Return the phone number stored on the related profile.

get_telephone_verifie(obj)[source]

Return whether the phone number stored on the related profile is verified.

Type renvoyé:

bool

get_is_technician(obj)[source]

Return whether the user is linked to a technician profile.

class api.serializers.StationSerializer(*args, **kwargs)[source]

Bases : ModelSerializer

Serialize charging station records for catalog and admin views.

class Meta[source]

Bases : object

model

alias de Station

fields = ('id_station', 'nom', 'localisation_text', 'latitude', 'longitude', 'statut')
class api.serializers.BorneSerializer(*args, **kwargs)[source]

Bases : ModelSerializer

Serialize physical kiosk/cabinet records with their station label.

class Meta[source]

Bases : object

model

alias de Borne

fields = ('id_borne', 'station', 'station_nom', 'numero', 'nom', 'mqtt_prefix', 'statut', 'emplacements_count')
extra_kwargs = {'mqtt_prefix': {'allow_blank': True, 'required': False}, 'station': {'required': True}, 'statut': {'required': False}}
get_emplacements_count(obj)[source]

Return the number of charging bays attached to the cabinet.

Type renvoyé:

int

class api.serializers.EmplacementSerializer(*args, **kwargs)[source]

Bases : ModelSerializer

Serialize charging bay records with their station and cabinet labels.

class Meta[source]

Bases : object

model

alias de Emplacement

fields = ('id_emplacement', 'station', 'station_nom', 'borne', 'borne_nom', 'borne_numero', 'numero', 'statut', 'lock_state')
extra_kwargs = {'borne': {'required': False}, 'station': {'required': False}}
validate(attrs)[source]

Derive the station from the selected cabinet and keep both aligned.

class api.serializers.DeviceAdminSerializer(*args, **kwargs)[source]

Bases : ModelSerializer

Serialize ESP32 inventory and firmware policy fields for admins.

class Meta[source]

Bases : object

model

alias de Device

fields = ('id_device', 'emplacement', 'station_nom', 'borne_nom', 'borne_numero', 'emplacement_numero', 'type_device', 'slot_id', 'mac_address', 'hardware_mac', 'ip_address', 'status', 'last_seen', 'firmware_version', 'expected_firmware_version', 'effective_expected_firmware_version', 'firmware_update_status', 'firmware_update_required', 'ota_target_version', 'ota_update_url', 'ota_requested_at', 'ota_completed_at', 'ota_last_error')
read_only_fields = ('id_device', 'station_nom', 'borne_nom', 'borne_numero', 'emplacement_numero', 'last_seen', 'firmware_version', 'firmware_update_required', 'ota_requested_at', 'ota_completed_at')
extra_kwargs = {'expected_firmware_version': {'allow_blank': True, 'required': False}, 'firmware_update_status': {'required': False}, 'ota_last_error': {'allow_blank': True, 'required': False}, 'ota_target_version': {'allow_blank': True, 'required': False}, 'ota_update_url': {'allow_blank': True, 'required': False}}
validate_firmware_update_status(value)[source]

Allow admins to edit only operational OTA status values.

get_firmware_update_required(obj)[source]

Return whether the device firmware differs from the expected version.

Type renvoyé:

bool

get_effective_expected_firmware_version(obj)[source]

Return the device override or global firmware target.

Type renvoyé:

str

class api.serializers.AuthMethodSerializer(*args, **kwargs)[source]

Bases : ModelSerializer

Serialize stored authentication methods without exposing raw secrets.

class Meta[source]

Bases : object

model

alias de Authentification

fields = ('id_auth', 'type_auth', 'type_label', 'hash_valeur', 'display_value', 'metadata', 'expiration')
extra_kwargs = {'hash_valeur': {'write_only': True}, 'metadata': {'read_only': True}}
get_display_value(obj)[source]

Return a safe authentication hint.

class api.serializers.ReservationSerializer(*args, **kwargs)[source]

Bases : ModelSerializer

Serialize reservations with station, bay and authentication metadata.

class Meta[source]

Bases : object

model

alias de Reservation

fields = ('id_reservation', 'reference_code', 'utilisateur', 'utilisateur_pseudo', 'emplacement', 'emplacement_numero', 'station_nom', 'borne_nom', 'borne_numero', 'authentification', 'auth_mode', 'auth_type', 'auth_display_value', 'auth_expiration', 'auth_is_active', 'date_debut', 'date_fin', 'duration_minutes', 'statut', 'can_cancel')
extra_kwargs = {'authentification': {'read_only': True}, 'utilisateur': {'read_only': True}}
get_can_cancel(obj)[source]

Return whether the reservation can still be cancelled by a user.

get_duration_minutes(obj)[source]

Return the reservation duration in minutes.

get_auth_display_value(obj)[source]

Return an authentication hint without leaking raw RFID identifiers.

class api.serializers.ReservationCreateSerializer(*args, **kwargs)[source]

Bases : Serializer

Validate reservation creation input from the user-facing API.

validate(attrs)[source]

Validate or derive the reservation end from an allowed duration.

class api.serializers.TechnicianMaintenanceSerializer(*args, **kwargs)[source]

Bases : ModelSerializer

Serialize maintenance work visible to the assigned technician.

class Meta[source]

Bases : object

model

alias de Maintenance

fields = ('id_maintenance', 'station', 'station_nom', 'emplacement_count', 'technicien', 'type', 'description', 'status', 'date_planifiee', 'date_realisee')
extra_kwargs = {'station': {'read_only': True}, 'technicien': {'read_only': True}}
get_emplacement_count(obj)[source]

Return the number of charging bays at the maintenance station.

Type renvoyé:

int

class api.serializers.TechnicianStationAssignmentSerializer(*args, **kwargs)[source]

Bases : ModelSerializer

Serialize station assignments used to scope technician access.

class Meta[source]

Bases : object

model

alias de TechnicienStation

fields = ('id_assignment', 'technicien', 'technicien_nom', 'station', 'station_nom', 'station_localisation', 'role', 'role_display', 'is_active', 'assigned_at')
extra_kwargs = {'assigned_at': {'read_only': True}, 'is_active': {'required': False}, 'role': {'required': False}}
get_role_display(obj)[source]

Return the localized role label.

Type renvoyé:

str

validate(attrs)[source]

Reject duplicate station assignments with a clear API error.

class api.serializers.TechnicianSerializer(*args, **kwargs)[source]

Bases : ModelSerializer

Serialize technician profiles for administrative management.

class Meta[source]

Bases : object

model

alias de Technicien

fields = ('id_technicien', 'utilisateur', 'utilisateur_pseudo', 'nom', 'email', 'telephone', 'assigned_stations')
extra_kwargs = {'utilisateur': {'allow_null': True, 'required': False}}
get_assigned_stations(obj)[source]

Return active station assignments without broadening technician scope.

class api.serializers.MaintenanceAdminSerializer(*args, **kwargs)[source]

Bases : ModelSerializer

Serialize maintenance records for administrative CRUD endpoints.

class Meta[source]

Bases : object

model

alias de Maintenance

fields = ('id_maintenance', 'station', 'station_nom', 'technicien', 'technicien_nom', 'type', 'description', 'status', 'date_planifiee', 'date_realisee')

Permissions

class api.permissions.IsStaffUser[source]

Bases : BasePermission

Allow access only to authenticated Django staff users.

message = 'Acces reserve aux administrateurs.'
has_permission(request, view)[source]

Return whether the request user has staff-level access.

Vues API

class api.views.OptionalPageNumberPagination[source]

Bases : PageNumberPagination

Paginate function-based list endpoints when the client requests it.

page_size = 50
page_size_query_param = 'page_size'
max_page_size = 200
api.views.register_availability(request, *args, **kwargs)[source]

Report whether a pseudo or email can be used for registration.

api.views.register(request, *args, **kwargs)[source]

Create a user account and return an authenticated JWT session.

api.views.login(request, *args, **kwargs)[source]

Authenticate a user and issue access and refresh tokens.

api.views.refresh_token(request, *args, **kwargs)[source]

Issue a new access token from the HttpOnly refresh cookie.

api.views.logout(request, *args, **kwargs)[source]

Clear the HttpOnly refresh cookie used by the browser session.

api.views.me(request, *args, **kwargs)[source]

Return the current authenticated user’s profile summary.

api.views.profile(request, *args, **kwargs)[source]

Read, update or delete the authenticated user’s account profile.

api.views.consentements(request, *args, **kwargs)[source]

Expose consent history and append editable preference changes.

api.views.change_password(request, *args, **kwargs)[source]

Change the authenticated user’s password after current-password check.

api.views.export_account(request, *args, **kwargs)[source]

Export the authenticated user’s account, reservations and audit history.

api.views.dashboard(request, *args, **kwargs)[source]

Return the authenticated user’s dashboard metrics and recent activity.

api.views.admin_overview(request, *args, **kwargs)[source]

Return aggregate administration metrics and recent records.

api.views.admin_supervision(request, *args, **kwargs)[source]

Return live supervision data for devices, alerts and sensors.

api.views.technician_supervision(request, *args, **kwargs)[source]

Return supervision data limited to the current technician station scope.

api.views.technician_acknowledge_alert(request, *args, **kwargs)[source]

Mark one scoped alert as taken in charge by the current technician.

api.views.technician_resolve_alert(request, *args, **kwargs)[source]

Resolve one scoped alert after intervention or operational verification.

api.views.admin_reservations(request, *args, **kwargs)[source]

Return upcoming and archived reservations for administrators.

api.views.admin_sessions(request, *args, **kwargs)[source]

Return active and archived charging sessions for administrators.

api.views.admin_users(request, *args, **kwargs)[source]

List users or create a user from the administration API.

api.views.admin_user_detail(request, *args, **kwargs)[source]

Retrieve, update or delete one user from the administration API.

api.views.admin_reset_user_password(request, *args, **kwargs)[source]

Generate and set a new temporary password for a user.

api.views.admin_user_auth_methods(request, *args, **kwargs)[source]

List active RFID badges for a user, or register a replacement badge.

api.views.admin_revoke_user_auth_method(request, *args, **kwargs)[source]

Soft-revoke an active RFID badge from the administration API.

api.views.admin_stations(request, *args, **kwargs)[source]

List stations or create a station from the administration API.

api.views.admin_station_detail(request, *args, **kwargs)[source]

Retrieve, update or delete one station from the administration API.

api.views.admin_bornes(request, *args, **kwargs)[source]

List physical charging cabinets or create one from the administration API.

api.views.admin_borne_detail(request, *args, **kwargs)[source]

Retrieve, update or delete one physical charging cabinet.

api.views.admin_emplacements(request, *args, **kwargs)[source]

List charging bays or create one from the administration API.

api.views.admin_emplacement_detail(request, *args, **kwargs)[source]

Retrieve, update or delete one charging bay from the admin API.

api.views.admin_devices(request, *args, **kwargs)[source]

List embedded devices with inventory and firmware policy fields.

api.views.admin_device_detail(request, *args, **kwargs)[source]

Retrieve or update one ESP32 inventory record.

api.views.admin_device_schedule_ota(request, *args, **kwargs)[source]

Record an admin-approved firmware update target for one ESP32.

api.views.auth_methods(request, *args, **kwargs)[source]

List saved RFID authentication methods for the authenticated user.

api.views.create_auth_method(request, *args, **kwargs)[source]

Create or refresh a saved RFID authentication method for the user.

Create a short one-use code used to link a physical RFID badge on a kiosk.

api.views.delete_auth_method(request, *args, **kwargs)[source]

Delete a saved RFID authentication method owned by the user.

api.views.auth_history(request, *args, **kwargs)[source]

Return the reservation authentication history for the user.

api.views.reservation_availability(request, *args, **kwargs)[source]

List charging bays available for one station and time slot.

api.views.stations_catalog(request, *args, **kwargs)[source]

Return stations with their charging bays for reservation screens.

api.views.reservations(request, *args, **kwargs)[source]

List user reservations or create a new reservation with access data.

api.views.cancel_reservation(request, *args, **kwargs)[source]

Cancel one reservation owned by the authenticated user.

api.views.reservation_access_payload(request, *args, **kwargs)[source]

Return the current temporary QR or code access for an active reservation.

api.views.send_reservation_access_code(request, *args, **kwargs)[source]

Send the current temporary reservation code by SMS.

api.views.admin_cancel_reservation(request, *args, **kwargs)[source]

Cancel any cancellable reservation from the administration API.

api.views.admin_reservation_access_payload(request, *args, **kwargs)[source]

Regenerate a temporary QR or code credential from the administration API.

api.views.admin_revoke_reservation_access(request, *args, **kwargs)[source]

Revoke the temporary credential attached to a QR/code reservation.

api.views.technician_maintenances(request, *args, **kwargs)[source]

List maintenance interventions assigned to the current technician.

api.views.admin_technicians(request, *args, **kwargs)[source]

List technicians or create a technician from the administration API.

api.views.admin_technician_detail(request, *args, **kwargs)[source]

Retrieve, update or delete one technician from the admin API.

api.views.admin_technician_station_assignments(request, *args, **kwargs)[source]

List or create station assignments for technician least privilege.

api.views.admin_technician_station_assignment_detail(request, *args, **kwargs)[source]

Retrieve, update or delete one technician station assignment.

api.views.admin_maintenances(request, *args, **kwargs)[source]

List maintenance records or create one from the admin API.

api.views.admin_maintenance_detail(request, *args, **kwargs)[source]

Retrieve, update or delete one maintenance record from the admin API.

Consume a short web-generated code and link the scanned RFID UID to that user.

api.views.terminal_create_mobile_session(request, *args, **kwargs)[source]

Create a short-lived pairing session opened by a phone from the kiosk QR.

api.views.mobile_session_detail(request, *args, **kwargs)[source]

Return a kiosk pairing session and the user’s reservations usable from it.

api.views.mobile_session_authorize(request, *args, **kwargs)[source]

Authorize one user reservation for the kiosk paired with this token.

api.views.terminal_mobile_session_status(request, *args, **kwargs)[source]

Return the current authorization state for a kiosk/mobile pairing token.

api.views.terminal_mobile_session_status_from_body(request, *args, **kwargs)[source]

Return a mobile session state using a fixed terminal endpoint.

api.views.terminal_consume_mobile_session(request, *args, **kwargs)[source]

Open the charging session authorized from the user’s phone.

api.views.terminal_consume_mobile_session_from_body(request, *args, **kwargs)[source]

Consume a mobile authorization using a fixed terminal endpoint.

api.views.terminal_offline_cache(request, *args, **kwargs)[source]

Return near-term reservations a kiosk may validate locally if backend is down.

api.views.terminal_offline_events(request, *args, **kwargs)[source]

Reconcile locally accepted kiosk events after a backend outage.

api.views.terminal_authenticate(request, *args, **kwargs)[source]

Validate terminal access credentials and open a charging session.

api.views.terminal_stop_session(request, *args, **kwargs)[source]

Close the active charging session after the ESP32 confirms a stop command.