Commit 14b42b3c authored by RJC's avatar RJC

changed url endpoints for detail views and modified html files to accomodate

parent e6ea1985
Pipeline #3048 failed with stages
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<p>{{ authors.bio }}</p><br> <p>{{ authors.bio }}</p><br>
<h2>Books by {{ authors.first_name }} {{ authors.last_name }} I love <3:</h2> <h2>Books by {{ authors.first_name }} {{ authors.last_name }} I love <3:</h2>
{% for books in authors.books.all %} {% for books in authors.books.all %}
<a href="http://127.0.0.1:8000/books/{{ books.pk }}">{{ books.title }}</a><br> <a href="http://127.0.0.1:8000/books/{{ books.pk }}/details/">{{ books.title }}</a><br>
{% endfor %} {% endfor %}
<br> <br>
<a href="http://127.0.0.1:8000/homepage/">Home</a> <a href="http://127.0.0.1:8000/homepage/">Home</a>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
{% block header %}RJ's Favorite Authors{% endblock %} {% block header %}RJ's Favorite Authors{% endblock %}
{% block content %} {% block content %}
{% for authors in authors %} {% for authors in authors %}
<a href="http://127.0.0.1:8000/authors/{{ authors.pk }}">{{ authors.first_name }} {{ authors.last_name }}</a><br> <a href="http://127.0.0.1:8000/authors/{{ authors.pk }}/details/">{{ authors.first_name }} {{ authors.last_name }}</a><br>
{% endfor %} {% endfor %}
<br> <br>
<a href="http://127.0.0.1:8000/homepage/">Home</a> <a href="http://127.0.0.1:8000/homepage/">Home</a>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
{% block title %}{{ books.title }}{% endblock %} {% block title %}{{ books.title }}{% endblock %}
{% block header %}{{ books.title }}{% endblock %} {% block header %}{{ books.title }}{% endblock %}
{% block content %} {% block content %}
<a href="http://127.0.0.1:8000/authors/{{ books.author.pk }}">{{ books.author }}</a><br> <a href="http://127.0.0.1:8000/authors/{{ books.author.pk }}/details/">{{ books.author }}</a><br>
<p>{{ books.publisher }}</p><br> <p>{{ books.publisher }}</p><br>
<p>{{ books.year_published }}</p><br> <p>{{ books.year_published }}</p><br>
<p>{{ books.ISBN }}</p><br> <p>{{ books.ISBN }}</p><br>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
{% block header %}RJ's Favorite Books{% endblock %} {% block header %}RJ's Favorite Books{% endblock %}
{% block content %} {% block content %}
{% for books in books %} {% for books in books %}
<a href="http://127.0.0.1:8000/books/{{ books.pk }}">{{ books.title }}</a><br> <a href="http://127.0.0.1:8000/books/{{ books.pk }}/details/">{{ books.title }}</a><br>
{% endfor %} {% endfor %}
<br> <br>
<a href="http://127.0.0.1:8000/homepage/">Home</a> <a href="http://127.0.0.1:8000/homepage/">Home</a>
......
...@@ -4,7 +4,7 @@ from .views import HomePageView, BookListView, BookDetailView, AuthorListView, A ...@@ -4,7 +4,7 @@ from .views import HomePageView, BookListView, BookDetailView, AuthorListView, A
urlpatterns = [ urlpatterns = [
path('homepage/', HomePageView.as_view()), path('homepage/', HomePageView.as_view()),
path('books/', BookListView.as_view()), path('books/', BookListView.as_view()),
path('books/<int:pk>/', BookDetailView.as_view()), path('books/<int:pk>/details/', BookDetailView.as_view()),
path('authors/', AuthorListView.as_view()), path('authors/', AuthorListView.as_view()),
path('authors/<int:pk>/', AuthorDetailView.as_view()), path('authors/<int:pk>/details/', AuthorDetailView.as_view()),
] ]
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