Commit ff678980 authored by Javi Ng's avatar Javi Ng

added button for editing from author/book page

parent 93120a6e
......@@ -3,7 +3,7 @@
{% block title %} Add New Author {% endblock %}
{% block content %}
<form method="POST" action="newauthor">
<form method="POST" action="details">
{% csrf_token %}
{{ form }}
......
......@@ -3,7 +3,7 @@
{% block title %} Add New Book {% endblock %}
{% block content %}
<form method="POST" action="newbook">
<form method="POST" action="details">
{% csrf_token %}
{{ form }}
......
......@@ -8,7 +8,9 @@
<h2>{{ object.age }} years old</h2>
<b>Nationality:</b> {{ object.nationality }} <br>
<b>Biography:</b> {{ object.bio }} <br> <br>
<form action="./edit">
<button type="submit">Edit Author</button>
</form>
{# iterate through set of related books (related_name is booklist) #}
<b>Books by {{ object }} I love:</b>
<ul>
......
......@@ -13,7 +13,9 @@
<b>Published </b>{{ object.year_published}} <br> <br>
<b>ISBN</b> {{ object.ISBN }} <br> <br>
<b>Blurb: </b>{{ object.blurb }} <br>
<form action="./edit">
<button type="submit">Edit Book</button>
</form>
{% endblock %}
{# navigation bar block #}
......
......@@ -3,7 +3,7 @@
{% block title %} Edit Author {% endblock %}
{% block content %}
<form method="POST" action="updateauthor">
<form method="POST" action="details">
{% csrf_token %}
{{ form }}
......
......@@ -3,7 +3,7 @@
{% block title %} Edit Book {% endblock %}
{% block content %}
<form method="POST" action="updatebook">
<form method="POST" action="details">
{% csrf_token %}
{{ form }}
......
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