lettings package#
lettings.admin module#
lettings.apps module#
lettings.models module#
- class lettings.models.Address(*args, **kwargs)[source]#
Bases :
ModelModèle représentant une adresse.
- Attributes:
number (PositiveIntegerField): Le numéro de l’adresse (entre 1 et 9999).
street (CharField): Le nom de la rue (max 64 caractères).
city (CharField): Le nom de la ville (max 64 caractères).
state (CharField): Le code d’État ou de province (2 caractères min).
zip_code (PositiveIntegerField): Le code postal (entre 1 et 99999).
country_iso_code (CharField): Le code ISO du pays (3 caractères min).
- Methods:
- __str__: Retourne une représentation sous forme
de chaîne de caractères de l’adresse.
- Meta:
verbose_name_plural: Nom au pluriel utilisé dans l’administration.
- exception DoesNotExist#
Bases :
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases :
MultipleObjectsReturned
- city#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- country_iso_code#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- id#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- letting#
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.restaurantis aReverseOneToOneDescriptorinstance.
- number#
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>#
- state#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- street#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- zip_code#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class lettings.models.Letting(*args, **kwargs)[source]#
Bases :
ModelModèle représentant une location.
- Attributes:
title (CharField): Le titre de la location (max 256 caractères).
- address (OneToOneField): L’adresse de la location
(relation un-à-un avec le modèle Address).
- Methods:
__str__: Retourne une représentation sous forme de chaîne de caractères de la location.
- exception DoesNotExist#
Bases :
ObjectDoesNotExist
- exception MultipleObjectsReturned#
Bases :
MultipleObjectsReturned
- address#
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.placeis aForwardOneToOneDescriptorinstance.
- address_id#
- 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>#
- title#
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.