Commit 3e36865a authored by Agu Syquia's avatar Agu Syquia

Updated the styling of multiple templates

Fixed spacing, and made code more readable
parent b2826720
...@@ -3,17 +3,16 @@ ...@@ -3,17 +3,16 @@
{% block title %}My Favorite Books{% endblock %} {% block title %}My Favorite Books{% endblock %}
{% block content %} {% block content %}
<h1>{{ object.author }}</h1> <h1>
{{ object.first_name }} {{ object.last_name }}<br> {{ object.author }}
{{ object.nationality }}<br> </h1>
{{ object.bio }}<br> {{ object.first_name }} {{ object.last_name }}<br>
<br> {{ object.nationality }}<br>
Books by {{ object.first_name }} {{ objects.last_name }} I love: {{ object.bio }}<br><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 #} {# https://stackoverflow.com/questions/70442828/django-object-list-from-listview-with-two-models #}
{% for object in author.books_set.all %} {% for object in author.books_set.all %}
<a href="{{ object.get_absolute_url }}">{{ object }}<br></a> <a href="{{ object.get_absolute_url }}">{{ object }}<br></a>
{% endfor %} {% endfor %}<br><br>
<br> <a href="/home">Home</a> <a href="/books">Books</a> <a href="/authors">Authors</a>
<a href="/home">Home</a> <a href="/books">Books</a> <a href="/authors">Authors</a>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -3,10 +3,11 @@ ...@@ -3,10 +3,11 @@
{% block title %}My Favorite Authors{% endblock %} {% block title %}My Favorite Authors{% endblock %}
{% block content %} {% block content %}
<h1>Agu's Favorite Authors:</h1> <h1>
{% for object in object_list %} Agu's Favorite Authors:
<a href="{{ object.get_absolute_url }}">{{ object.first_name }} {{ object.last_name}}<br></a> </h1>
{% endfor %} {% for object in object_list %}
<br> <a href="{{ object.get_absolute_url }}">{{ object.first_name }} {{ object.last_name}}<br></a>
<a href="/home">Home</a> <a href="/books">Books</a> {% endfor %}<br>
<a href="/home">Home</a> <a href="/books">Books</a>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -10,6 +10,6 @@ ...@@ -10,6 +10,6 @@
{{ object.publisher }}<br> {{ object.publisher }}<br>
{{ object.year_published }}<br> {{ object.year_published }}<br>
{{ object.ISBN }}<br> {{ object.ISBN }}<br>
{{ object.blurb }}<br> {{ object.blurb }}<br><br>
<a href="/home">Home</a> <a href="/books">Books</a> <a href="/authors">Authors</a> <a href="/home">Home</a> <a href="/books">Books</a> <a href="/authors">Authors</a>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -3,10 +3,12 @@ ...@@ -3,10 +3,12 @@
{% block title %}My Favorite Books{% endblock %} {% block title %}My Favorite Books{% endblock %}
{% block content %} {% block content %}
<h1>Agu's Favorite Books:</h1> <h1>
{% for object in object_list %} Agu's Favorite Books:
<a href="{{ object.get_absolute_url }}">{{ object.title }}<br></a> </h1>
{% endfor %} {% for object in object_list %}
<br> <a href="{{ object.get_absolute_url }}">
{{ object.title }}<br></a>
{% endfor %}<br>
<a href="/home">Home</a> <a href="/authors">Authors</a> <a href="/home">Home</a> <a href="/authors">Authors</a>
{% endblock %} {% 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