lettings

models

class lettings.models.Address(*args, **kwargs)[source]

Bases: Model

Data object storing all address details

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

city

the city of the address

country_iso_code

iso code of the address’s country (3 chars)

number

the street number of the address

state

the state of the address (2 digits)

street

the street of the address

zip_code

the zip code of the address (int between 0 and 99999)

class lettings.models.Letting(*args, **kwargs)[source]

Bases: Model

Data object storing letting informations

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

address

A reference to an Address object

title

the title of the letting

tests

lettings.tests.test_letting_models()[source]

Test the Letting model behavior

lettings.tests.test_letting_single_view()[source]

Test that single letting views are correctly displayed.

lettings.tests.test_letting_urls()[source]

Test that the name views and url are correct

lettings.tests.test_lettings_index()[source]

Test the global lettings view

views

lettings.views.index(request)[source]

Displays the list of all available lettings

lettings.views.letting(request, letting_id)[source]

Displays details of a single letting.

Args: * letting_id: the id of the letting to diplay.