Commit a0de761a authored by Jan Ericsson Ong Ang's avatar Jan Ericsson Ong Ang

Editetd 4 new htmls

parent ec6eaa00
......@@ -7,15 +7,15 @@
<form method="post">
{% csrf_token %}
<label>First Name: </label>
<input id="first_name" type="text" name="first_name" max length="50" required/>
<input id="first_name" type="text" name="first_name" max length="50"/>
<label>Last Name: </label>
<input id="last_name" type="text" name="last_name" max length="100" required/>
<input id="last_name" type="text" name="last_name" max length="100"/>
<label>Age: </label>
<input id="age" type="number" name="age" required/>
<input id="age" type="number" name="age"/>
<label>Nationality: </label>
<input id="nationality" type="text" name="nationality" required/>
<input id="nationality" type="text" name="nationality"/>
<label>Bio: </label>
<input id="bio" type="text" name="bio" required/>
<input id="bio" type="text" name="bio"/>
</form>
<button type="button">
......
......@@ -7,21 +7,21 @@
<form method="post">
{% csrf_token %}
<label>Title: </label>
<input id="title" type="text" name="title" max length="50" required/>
<input id="title" type="text" name="title" max length="50"/>
<label>Author: </label>
<input id="author" type="text" name="author" max length="100" required/>
<input id="author" type="text" name="author" max length="100"/>
<label>Publisher: </label>
<input id="publisher" type="text" name="publisher" required/>
<input id="publisher" type="text" name="publisher"/>
<label>Year Published: </label>
<input id="year_published" type="number" name="year_published" required/>
<input id="year_published" type="number" name="year_published"/>
<label>ISBN: </label>
<input id="ISBN" type="number" name="ISBN" required/>
<input id="ISBN" type="number" name="ISBN"/>
<label>Blurb: </label>
<input id="blurb" type="text" name="blurb" required/>
<input id="blurb" type="text" name="blurb"/>
</form>
<button type="button">
<a href="/bookshelf/books/{{ book.id }}/details/">
<a href="/bookshelf/books/{{ books.id }}/details/">
Add Book
</a>
</button><br>
......
......@@ -4,17 +4,18 @@
{% block title %}Edit Author{% endblock %}
{% block content %}
<form>
<form method="post">
{% csrf_token %}
<label>First Name: </label>
<input id="first_name" type="text" name="first_name" max length="50" required/>
<input id="first_name" type="text" name="first_name" max length="50"/>
<label>Last Name: </label>
<input id="last_name" type="text" name="last_name" max length="100" required/>
<input id="last_name" type="text" name="last_name" max length="100"/>
<label>Age: </label>
<input id="age" type="number" name="age" required/>
<input id="age" type="number" name="age"/>
<label>Nationality: </label>
<input id="nationality" type="text" name="nationality" required/>
<input id="nationality" type="text" name="nationality"/>
<label>Bio: </label>
<input id="bio" type="text" name="bio" required/>
<input id="bio" type="text" name="bio"/>
</form>
<button type="button">
......
......@@ -4,19 +4,20 @@
{% block title %}Edit Book{% endblock %}
{% block content %}
<form>
<form method="post">
{% csrf_token %}
<label>Title: </label>
<input id="title" type="text" name="title" max length="50" required/>
<input id="title" type="text" name="title" max length="50"/>
<label>Author: </label>
<input id="author" type="text" name="author" max length="100" required/>
<input id="author" type="text" name="author" max length="100"/>
<label>Publisher: </label>
<input id="publisher" type="text" name="publisher" required/>
<input id="publisher" type="text" name="publisher"/>
<label>Year Published: </label>
<input id="year_published" type="number" name="year_published" required/>
<input id="year_published" type="number" name="year_published"/>
<label>ISBN: </label>
<input id="ISBN" type="number" name="ISBN" required/>
<input id="ISBN" type="number" name="ISBN"/>
<label>Blurb: </label>
<input id="blurb" type="text" name="blurb" required/>
<input id="blurb" type="text" name="blurb"/>
</form>
<button type="button">
......
......@@ -27,7 +27,7 @@ class AuthorView(ListView):
if form.is_valid():
return self.get(request, *args, **kwargs)
else:
return render(request, self.template_name, {'form': form})
return render(request, 'bookshelf/author_details.html', {'form': form})
class AuthorDetailView(DetailView):
......@@ -52,7 +52,7 @@ class BooksView(ListView):
if form.is_valid():
return self.get(request, *args, **kwargs)
else:
return render(request, self.template_name, {'form': form})
return render(request, 'bookshelf/book_details.html', {'form': form})
class BookDetailView(DetailView):
pk_url_kwarg = 'id'
......
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