Commit 519e668e authored by Jan Ericsson Ong Ang's avatar Jan Ericsson Ong Ang

Edited html template files

parent fa5ac0e4
{% extends 'base.html' %}
{% load static %}
{% block title %}Add New Author{% endblock %}
{% block content %}
<form method="post">
<form method="POST">
{% csrf_token %}
<label>First Name: </label>
<input id="first_name" type="text" name="first_name" max length="50"/><br>
<label>Last Name: </label>
<input id="last_name" type="text" name="last_name" max length="100"/><br>
<label>Age: </label>
<input id="age" type="number" name="age"/><br>
<label>Nationality: </label>
<input id="nationality" type="text" name="nationality"/><br>
<label>Bio: </label>
<input id="bio" type="text" name="bio"/><br>
{{ form.as_p }}
<input type="Submit" value="Add Author">
</form>
<button type="button">
<a href="/bookshelf/authors/{{ author.id }}/details/">
Add Author
</a>
</button><br>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% load static %}
{% block title %}Add New Book{% endblock %}
{% block content %}
<form method="post">
<form method="POST">
{% csrf_token %}
<label>Title: </label>
<input id="title" type="text" name="title" max length="50"/><br>
<label>Author: </label>
<input id="author" type="text" name="author" max length="100"/><br>
<label>Publisher: </label>
<input id="publisher" type="text" name="publisher"/><br>
<label>Year Published: </label>
<input id="year_published" type="number" name="year_published"/><br>
<label>ISBN: </label>
<input id="ISBN" type="number" name="ISBN"/><br>
<label>Blurb: </label>
<input id="blurb" type="text" name="blurb"/><br>
{{ form.as_p }}
<input type="Submit" value="Add Book">
</form>
<button type="button">
<a href="/bookshelf/books/{{ books.id }}/details/">
Add Book
</a>
</button><br>
{% endblock %}
\ No newline at end of file
......@@ -10,7 +10,7 @@
<p>{{ author.bio }}</p>
<button type="button">
<a href="/bookshelf/authors/{{ author.id }}/edit/">
<a href="/bookshelf/authors/{{ object.id }}/edit/">
Edit Author
</a>
</button><br>
......
......@@ -11,7 +11,7 @@
<p>{{ books.ISBN }}</p>
<p>{{ books.blurb }}</p>
<button type="button">
<a href="/bookshelf/books/{{ books.id }}/edit/">
<a href="/bookshelf/books/{{ object.id }}/edit/">
Edit Book
</a>
</button><br>
......
{% extends 'base.html' %}
{% load static %}
{% block title %}Edit Author{% endblock %}
{% block content %}
<form method="post">
<form method="POST">
{% csrf_token %}
<label>First Name: </label>
<input id="first_name" type="text" name="first_name" max length="50"/><br>
<label>Last Name: </label>
<input id="last_name" type="text" name="last_name" max length="100"/><br>
<label>Age: </label>
<input id="age" type="number" name="age"/><br>
<label>Nationality: </label>
<input id="nationality" type="text" name="nationality"/><br>
<label>Bio: </label>
<input id="bio" type="text" name="bio"/><br>
{{ form.as_p }}
<input type="Submit" value="Save Changes">
</form>
<button type="button">
<a href="/bookshelf/authors/{{ author.id }}/details/">
Add Author
</a>
</button><br>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% load static %}
{% block title %}Edit Book{% endblock %}
{% block content %}
<form method="post">
<form method="POST">
{% csrf_token %}
<label>Title: </label>
<input id="title" type="text" name="title" max length="50"/><br>
<label>Author: </label>
<input id="author" type="text" name="author" max length="100"/><br>
<label>Publisher: </label>
<input id="publisher" type="text" name="publisher"/><br>
<label>Year Published: </label>
<input id="year_published" type="number" name="year_published"/><br>
<label>ISBN: </label>
<input id="ISBN" type="number" name="ISBN"/><br>
<label>Blurb: </label>
<input id="blurb" type="text" name="blurb"/><br>
{{ form.as_p }}
<input type="Submit" value="Save Changes">
</form>
<button type="button">
<a href="/bookshelf/books/{{ books.id }}/details/">
Add Book
</a>
</button><br>
{% 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