Commit 4cb6eeac authored by Migs Atienza's avatar Migs Atienza

Created authors_details.html

parent 53587adc
...@@ -13,7 +13,7 @@ class Author(models.Model): ...@@ -13,7 +13,7 @@ class Author(models.Model):
return '{} {}'.format(self.first_name, self.last_name) return '{} {}'.format(self.first_name, self.last_name)
def get_absolute_url(self): def get_absolute_url(self):
return reverse('bookshelf:author_details', kwargs={'pk': self.pk}) return reverse('bookshelf:authors_details', kwargs={'pk': self.pk})
class Book(models.Model): class Book(models.Model):
......
{% extends 'base.html' %}
{% block title %}{{ object.first_name }} {{ object.last_name}}{% endblock %}
{% block content %}
<h3>
<a>
{{ object.first_name }} {{ object.last_name}}
</a><br/>
<a>
{{ object.age }} years old
</a><br/>
<a>
{{ object.nationality }}
</a><br/>
<a>
{{ object.bio }}
</a><br/><br/>
</h3>
<h2>
Books by {{ object.first_name }} {{ object.last_name}} I Love:<br/>
</h2>
<ul>
</ul>
{% endblock %}
{% block links %}
<center><br/><br/><br/><br/><br/>
<a href="/bookshelf/home">Home</a>
<a href="/bookshelf/books">Books</a>
<a href="/bookshelf/authors">Authors</a></center>
{% endblock %}
\ No newline at end of file
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</center>{% endblock %} </center>{% endblock %}
{% block links %} {% block links %}
<center><br/><br/><br/><br/><br/> <center><br/><br/><br/><br/><br/>
<a href="home">Home</a> <a href="/bookshelf/home">Home</a>
<a href="books">Books</a> <a href="/bookshelf/books">Books</a>
<a href="authors">Authors</a></center> <a href="/bookshelf/authors">Authors</a></center>
{% 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