Commit 238c699e authored by Deokhyun Lee's avatar Deokhyun Lee

id order for book is now in order

parent bbf420db
Pipeline #2966 canceled with stages
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% block title %} {% block title %}
{% if author %} {% if author %}
{{author.first_name}}{{author.last_name}} {{author.first_name}} {{author.last_name}}
{% else %} {% else %}
<p>No Available Author.</p> <p>No Available Author.</p>
{% endif %} {% endif %}
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
{% if books %} {% if books %}
<ul> <ul>
{% for book in books %} {% for book in books %}
<a href={{book.id}}/details>{{ book.title }}</a><br> <a href={{book.id}}/details>{{ book.title }} {{ book.id }}</a><br>
{% endfor %} {% endfor %}
</ul> </ul>
{% else %} {% else %}
......
...@@ -33,7 +33,7 @@ class BookListView(ListView): ...@@ -33,7 +33,7 @@ class BookListView(ListView):
model = Books model = Books
template_name = 'books/index.html' template_name = 'books/index.html'
context_object_name = 'books' context_object_name = 'books'
ordering = ['year_published'] ordering = ['id']
class BookDetailView(DetailView): class BookDetailView(DetailView):
model = Books model = Books
......
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