created authors_details.html which displays details about the Author and the books that he made

parent aaf9d0c0
{% extends 'base.html' %}
{% load static %}
{% block title %}{{ object.first_name }} {{ object.last_name }}{% endblock %}
{% block content %}
<h1>{{ object.first_name }} {{ object.last_name }}</h1>
<p>Age: {{ object.age }} years old</p>
<p>Nationality: {{ object.nationality }}</p>
<p>Biography: {{ object.bio }}</p>
<b>Books by {{ object }} I love:</b>
<ul>
{% for book in object.book_set.all %}
<li>
<a href="{{ book.get_absolute_url }}">{{book.title}}
</a>
</li>
{% endfor %}
</ul>
<a href = '../../home'>Home</a>
<a href = '../../books'>Books</a>
<a href = '../../authors'>Authors</a>
{% endblock %}
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