Created the templates for the needed web pages

parent e475c65f
{% extends 'base.html' %}
{% load static %}
{% block title %}
{{ object }}
{% endblock %}
{% block heading %}
<h1>{{ object }}</h1>
{% endblock %}
{% block content %}
<p>{{ object.age }}</p>
<p>{{ object.nationality }}</p>
<p>{{ object.bio }}</p>
<p>Books by {{ object }} I love:</p>
<ul>
{% for book in books %}
{% if book.author == object %}
<li>
<a href="{{ book.get_absolute_url }}">
{{ book.title }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endblock %}
{% block footer %}
<a href="{% url 'bookshelf:home' %}">Home</a>
<a href="{% url 'bookshelf:books-list' %}">Books</a>
<a href="{% url 'bookshelf:authors-list' %}">Authors</a>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% load static %}
{% block title %}My Favorite Authors{% endblock %}
{% block heading %}
<h1>Addy's Favorite Authors:</h1>
{% endblock %}
{% block content %}
<ul>
{% for object in object_list %}
<li>
<a href="{{ object.get_absolute_url }}">
{{ object }}
</a>
</li>
{% endfor %}
</ul>
{% endblock %}
{% block footer %}
<a href="{% url 'bookshelf:home' %}">Home</a>
<a href="{% url 'bookshelf:books-list' %}">Books</a>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% load static %}
{% block title %}
{{ object.title }}
{% endblock %}
{% block heading %}
<h1>{{ object.title }}</h1>
{% endblock %}
{% block content %}
<p>
<a href="{{ object.author.get_absolute_url }}">
{{ object.author }}
</a>
</p>
<p>{{ object.publisher }}</p>
<p>{{ object.year_published }}</p>
<p>{{ object.ISBN }}</p>
<p>{{ object.blurb }}</p>
{% endblock %}
{% block footer %}
<a href="{% url 'bookshelf:home' %}">Home</a>
<a href="{% url 'bookshelf:books-list' %}">Books</a>
<a href="{% url 'bookshelf:authors-list' %}">Authors</a>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% load static %}
{% block title %}My Favorite Books{% endblock %}
{% block heading %}
<h1>Addy's Favorite Books:</h1>
{% endblock %}
{% block content %}
<ul>
{% for object in object_list %}
<li>
<a href="{{ object.get_absolute_url }}">
{{ object.title }}
</a>
</li>
{% endfor %}
</ul>
{% endblock %}
{% block footer %}
<a href="{% url 'bookshelf:home' %}">Home</a>
<a href="{% url 'bookshelf:authors-list' %}">Authors</a>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% load static %}
{% block title %}My Favorite Books & Authors{% endblock %}
{% block heading %}
<h1>Welcome to Addy's Database of Favorite Books and Authors!</h1>
{% endblock %}
{% block content %}
<p>In this database, you can see Addy's most-loved books!
She enjoys books of different themes and genres.
Some revolve around romance, self-discovery, and self-improvement.
While the others are more heavy, such as books under thriller, crime, and mystery.
</p>
{% endblock %}
{% block footer %}
<a href="{% url 'bookshelf:books-list' %}">Books</a>
<a href="{% url 'bookshelf:authors-list' %}">Authors</a>
{% endblock %}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment