Lettings models#

class lettings.models.Address(*args, **kwargs)#

A class to represent an address.

Attributes:

number (PositiveIntegerField): The street number of the address.

street (CharField): The name of the street (64 characters).

city (CharField): The city where the address is located (64 characters).

state (CharField): The state or region code (2 characters).

zip_code (PositiveIntegerField): The ZIP code of the address.

country_iso_code (CharField): The ISO code of the country (3 characters).

Methods:

__str__(): Returns a string representation of the address.

Meta:

verbose_name_plural (str): The plural name for the model in the Django admin.

class lettings.models.Letting(*args, **kwargs)#

A class to represent a letting.

Attributes:

title (CharField): The title of letting.

address (Address): The adress of letting. Has one to one reletionship with model letting.Address

Methods:

__str__(): Returns a string representation of the letting.