rename books->book

This commit is contained in:
Kostiantyn Stoliarskyi 2023-04-24 11:36:03 +03:00
parent 59c1bed020
commit 9f4c3d938d
5 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@
<!-- prettier-ignore --> <!-- prettier-ignore -->
{% include 'sidebar.html' %} {% include 'sidebar.html' %}
{% include 'right_sidebar.html' %} {% include 'right_sidebar.html' %}
{% include 'books/add_book_modal.html' %} {% include 'book/add_book_modal.html' %}
<div class="sm:mx-64 p-0 mt-16 h-full overflow-x-scroll"> <div class="sm:mx-64 p-0 mt-16 h-full overflow-x-scroll">
<!-- Main Content --> <!-- Main Content -->

View File

@ -26,7 +26,7 @@ def get_all():
pagination = create_pagination(total=books.count()) pagination = create_pagination(total=books.count())
return render_template( return render_template(
"books/index.html", "book/index.html",
books=books.paginate(page=pagination.page, per_page=pagination.per_page), books=books.paginate(page=pagination.page, per_page=pagination.per_page),
page=pagination, page=pagination,
search_query=q, search_query=q,
@ -56,4 +56,4 @@ def view(book_id):
flash("Book not found", "danger") flash("Book not found", "danger")
return redirect(url_for("book.get_all")) return redirect(url_for("book.get_all"))
else: else:
return render_template("books/view.html", book=b) return render_template("book/view.html", book=b)