Commit 93120a6e authored by Javi Ng's avatar Javi Ng

updated navigation bar code

parent 5831d3d3
...@@ -25,7 +25,9 @@ ...@@ -25,7 +25,9 @@
{# navigation bar block #} {# navigation bar block #}
{% block table %} {% block table %}
<tr>
<td><a href = '../../home'>Home</a></td> <td><a href = '../../home'>Home</a></td>
<td><a href = '../../books'>Books</a></td> <td><a href = '../../books'>Books</a></td>
<td><a href = '../../authors'>Authors</a></td> <td><a href = '../../authors'>Authors</a></td>
</tr>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
{# navigation bar block #} {# navigation bar block #}
{% block table %} {% block table %}
<tr>
<td><a href = '../home'>Home</a></td> <td><a href = '../home'>Home</a></td>
<td><a href = '../books'>Books</a></td> <td><a href = '../books'>Books</a></td>
</tr>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
{# navigation bar block #} {# navigation bar block #}
{% block table %} {% block table %}
<tr>
<td><a href = '../../home'>Home</a></td> <td><a href = '../../home'>Home</a></td>
<td><a href = '../../books'>Books</a></td> <td><a href = '../../books'>Books</a></td>
<td><a href = '../../authors'>Authors</a></td> <td><a href = '../../authors'>Authors</a></td>
</tr>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
{# navigation bar block #} {# navigation bar block #}
{% block table %} {% block table %}
<tr>
<td><a href = '../home'>Home</a></td> <td><a href = '../home'>Home</a></td>
<td><a href = '../authors'>Authors</a></td> <td><a href = '../authors'>Authors</a></td>
</tr>
{% endblock %} {% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% load static %}
{% block title %} Edit Author {% endblock %}
{% block content %}
<form method="POST" action="updateauthor">
{% csrf_token %}
{{ form }}
<input type="Submit">
</form>
{% endblock %}
\ No newline at end of file
{% extends 'base.html' %}
{% load static %}
{% block title %} Edit Book {% endblock %}
{% block content %}
<form method="POST" action="updatebook">
{% csrf_token %}
{{ form }}
<input type="Submit">
</form>
{% endblock %}
\ No newline at end of file
...@@ -9,6 +9,12 @@ ...@@ -9,6 +9,12 @@
{# navigation bar block #} {# navigation bar block #}
{% block table %} {% block table %}
<tr>
<td><a href = '../books'>Books</a></td> <td><a href = '../books'>Books</a></td>
<td><a href = '../authors'>Authors</a></td> <td><a href = '../authors'>Authors</a></td>
</tr>
<tr>
<td><a href = '../books/add/'>Add Book</a></td>
<td><a href = '../authors/add/'>Add Book</a></td>
</tr>
{% endblock %} {% endblock %}
\ No newline at end of file
...@@ -6,9 +6,9 @@ urlpatterns = [ ...@@ -6,9 +6,9 @@ urlpatterns = [
path('books/', views.BookListView.as_view(), name="booklist"), path('books/', views.BookListView.as_view(), name="booklist"),
path('books/<int:pk>/details', views.BookDetailView.as_view(), name="bookdetail"), path('books/<int:pk>/details', views.BookDetailView.as_view(), name="bookdetail"),
path('books/add/', views.BookCreateView.as_view(), name="newbook"), path('books/add/', views.BookCreateView.as_view(), name="newbook"),
path('books/<int:pk>/details', views.BookUpdateView.as_view(), name="updatebook"), path('books/<int:pk>/edit', views.BookUpdateView.as_view(), name="updatebook"),
path('authors/', views.AuthorListView.as_view(), name="authorlist"), path('authors/', views.AuthorListView.as_view(), name="authorlist"),
path('authors/<int:pk>/details', views.AuthorDetailView.as_view(), name="authordetail"), path('authors/<int:pk>/details', views.AuthorDetailView.as_view(), name="authordetail"),
path('authors/add/', views.AuthorCreateView.as_view(), name="newauthor"), path('authors/add/', views.AuthorCreateView.as_view(), name="newauthor"),
path('authors/<int:pk>/details', views.AuthorUpdateView.as_view(), name="updateauthor"), path('authors/<int:pk>/edit', views.AuthorUpdateView.as_view(), name="updateauthor"),
] ]
\ No newline at end of file
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
<br> <br>
{# block for navigation bar, app pages simply put table data for needed links #} {# block for navigation bar, app pages simply put table data for needed links #}
<table> <tr> <table>
{% block table %}{% endblock %} {% block table %}{% endblock %}
</table> </tr> </table>
</body> </body>
......
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