The Lettings feature lets users browse every available holiday home and view the details of any individual property. From the listings index, visitors can see all available rentals at a glance; clicking a title takes them to a dedicated detail page showing the full postal address for that property.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/OpenClassrooms-Student-Center/Python-OC-Lettings-FR/llms.txt
Use this file to discover all available pages before exploring further.
Listings index
Route:GET /lettings/
The listings index page queries all Letting objects from the database and renders them as a clickable list. Each item in the list displays the property’s title and links to that letting’s detail page.
If no lettings have been created yet, the page displays a “No lettings are available.” message instead of an empty list.
Letting detail page
Route:GET /lettings/<letting_id>/
The detail page fetches a single Letting by its integer id and renders the following information:
- Title — the name of the property
- Address — the full postal address, rendered across three lines:
numberandstreetcity,state, andzip_codecountry_iso_code
Data model
Address
Every letting is linked to exactly oneAddress record via a OneToOneField. The Address model stores the full postal details for a property:
| Field | Type | Constraints |
|---|---|---|
number | Positive integer | Maximum value: 9999 |
street | String | Maximum length: 64 characters |
city | String | Maximum length: 64 characters |
state | String | Exactly 2 characters |
zip_code | Positive integer | Maximum value: 99999 |
country_iso_code | String | Exactly 3 characters (ISO 3166-1) |
Letting
TheLetting model ties a human-readable title to an address:
Letting also cascades to its linked Address record.
Explore other features
User profiles
Browse registered user profiles and their favorite city preferences.
Admin panel
Manage lettings, addresses, and profiles through the Django admin interface.