Fix author edit page

parent cf36ccfc
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
{{author.nationality}} <br /> {{author.nationality}} <br />
{{author.bio}} <br /> {{author.bio}} <br />
<button onclick="window.location.href='../../../books/{{author.id}}/edit/';">Edit Author</button> <br /> <button onclick="window.location.href='../../../authors/{{author.id}}/edit/';">Edit Author</button> <br />
Books by {{author.first_name}} {{author.last_name}} I love: Books by {{author.first_name}} {{author.last_name}} I love:
<ul> <ul>
......
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %} {% load static %}
{% block title %}Add New Author{% endblock %} {% block title %}Edit Author{% endblock %}
{% block content %} {% block content %}
<form class = "aligned_left_paragraph_small" method="post"> <form class = "aligned_left_paragraph_small" method="post">
......
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %} {% load static %}
{% block title %}Add New Book{% endblock %} {% block title %}Edit Book{% endblock %}
{% block content %} {% block content %}
<form class = "aligned_left_paragraph_small" method="post"> <form class = "aligned_left_paragraph_small" method="post">
......
...@@ -10,7 +10,7 @@ urlpatterns = [ ...@@ -10,7 +10,7 @@ urlpatterns = [
path('books/add', views.addbooks_view.as_view(), name='add_book'), path('books/add', views.addbooks_view.as_view(), name='add_book'),
path('authors/add', views.addauthors_view.as_view(), name='add_author'), path('authors/add', views.addauthors_view.as_view(), name='add_author'),
path('books/<int:pk>/edit/', views.editbooks_view.as_view(), name='edit_book'), path('books/<int:pk>/edit/', views.editbooks_view.as_view(), name='edit_book'),
path('books/<int:pk>/edit/', views.editauthors_view.as_view(), name='edit_author'), path('authors/<int:pk>/edit/', views.editauthors_view.as_view(), name='edit_author'),
] ]
app_name = "bookshelf" app_name = "bookshelf"
\ 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