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

Edited html template files

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