Modèle Offre

Module contenant le modèle Offre pour la gestion des offres commerciales.

Ce module définit la structure de données pour les offres de billets et packages disponibles pour les événements des Jeux Olympiques.

class api.models.offre.Offre(*args, **kwargs)

Bases : Model

Modèle représentant une offre commerciale.

Une offre correspond à un package ou type de billet disponible pour les spectateurs, avec un prix variable selon le nombre de personnes.

Variables:
  • libelle – Nom de l’offre

  • nb_personne – Nombre de personnes concernées par l’offre

  • montant – Montant de l’offre en euros

  • description – Description détaillée de l’offre

libelle

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

nb_personne

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

montant

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

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>
ticket_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.