Commit 1857940c authored by Agu Syquia's avatar Agu Syquia

Created author_details.html

Template rendered by the AuthorsDetailsView class
parent 00e12e21
{% extends 'base.html' %}
{% load static%}
{% block title %}My Favorite Books{% endblock %}
{% block content %}
<h1>{{ object.author }}</h1>
{{ object.first_name }} {{ object.last_name }}<br>
{{ object.nationality }}<br>
{{ object.bio }}<br>
<br>
Books by {{ object.first_name }} {{ objects.last_name }} I love:
<br>
{# https://stackoverflow.com/questions/70442828/django-object-list-from-listview-with-two-models #}
{% for object in author.books_set.all %}
<a href="{{ object.get_absolute_url }}">{{ object }}<br></a>
{% endfor %}
<br>
<a href="/home">Home</a> <a href="/books">Books</a> <a href="/authors">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