Source

django-bibliophile / bibliophile / templates / bibliophile / author_detail.html

{% extends 'base.html' %}

{% block title %}Bibliophile: {{ object }}{% endblock %}

{% block content %}
<h2>Author: {{ object.first_name }} {{ object.last_name }}</h2>

{% if object.website %}<div>
    <strong>Website</strong>: <a href="{{ object.website }}">{{ object.website }}</a>
</div>{% endif %}

<div>
    <b>Books On Record</b>
    {% for book in object.book_set.all %}
    {% if forloop.first %}<ul>{% endif %}
        <li>
            <div class="book-title">{{ book.title }}</div>
            {% if book.amazon_lookup %}
            <div>
                Price on Amazon: <a href="{{ book.amazon_url }}">{{ book.price }}</a>
            </div>
            {% endif %}
        </li>
    {% if forloop.last %}</ul>{% endif %}
    {% endfor %}
</div>
{% endblock %}