commit message

This commit is contained in:
Guy King
2020-07-29 08:15:11 +01:00
commit af3ab5adea
23 changed files with 441 additions and 0 deletions

4
templates/index.html Normal file
View File

@@ -0,0 +1,4 @@
<title>Holiday Homes</title>
<h1>Welcome to Holiday Homes</h1>
<div><a href="{% url 'profiles_index' %}">Profiles</a></div>
<div><a href="{% url 'lettings_index' %}">Lettings</a></div>

8
templates/letting.html Normal file
View File

@@ -0,0 +1,8 @@
<title>{{ title }}</title>
<h1>{{ title }}</h1>
<p>{{ address.number }} {{ address.street }}</p>
<p>{{ address.city }}, {{ address.state }} {{ address.zip_code }}</p>
<p>{{ address.country_iso_code }}</p>
<div><a href="{% url 'lettings_index' %}">Back</a></div>
<div><a href="{% url 'index' %}">Home</a></div>
<div><a href="{% url 'profiles_index' %}">Profiles</a></div>

View File

@@ -0,0 +1,17 @@
<title>Lettings</title>
<h1>Lettings</h1>
{% if lettings_list %}
<ul>
{% for letting in lettings_list %}
<li>
<a href="{% url 'letting' letting_id=letting.id %}">
{{ letting.title }}
</a>
</li>
{% endfor %}
</ul>
{% else %}
<p>No lettings are available.</p>
{% endif %}
<div><a href="{% url 'index' %}">Home</a></div>
<div><a href="{% url 'profiles_index' %}">Profiles</a></div>

9
templates/profile.html Normal file
View File

@@ -0,0 +1,9 @@
<title>{{ profile.user.username }}</title>
<h1>{{ profile.user.username }}</h1>
<p>First name: {{ profile.user.first_name }}</p>
<p>Last name: {{ profile.user.last_name }}</p>
<p>Email: {{ profile.user.email }}</p>
<p>Favorite city: {{ profile.favorite_city }}</p>
<div><a href="{% url 'profiles_index' %}">Back</a></div>
<div><a href="{% url 'index' %}">Home</a></div>
<div><a href="{% url 'lettings_index' %}">Lettings</a></div>

View File

@@ -0,0 +1,17 @@
<title>Profiles</title>
<h1>Profiles</h1>
{% if profiles_list %}
<ul>
{% for profile in profiles_list %}
<li>
<a href="{% url 'profile' username=profile.user.username %}">
{{ profile.user.username }}
</a>
</li>
{% endfor %}
</ul>
{% else %}
<p>No profiles are available.</p>
{% endif %}
<div><a href="{% url 'index' %}">Home</a></div>
<div><a href="{% url 'lettings_index' %}">Lettings</a></div>