From 9f4c3d938d0433075780270385d6e203a95b27db Mon Sep 17 00:00:00 2001 From: Kostiantyn Stoliarskyi Date: Mon, 24 Apr 2023 11:36:03 +0300 Subject: [PATCH] rename books->book --- app/templates/base.html | 2 +- app/templates/{books => book}/add_book_modal.html | 0 app/templates/{books => book}/index.html | 0 app/templates/{books => book}/view.html | 0 app/views/book.py | 4 ++-- 5 files changed, 3 insertions(+), 3 deletions(-) rename app/templates/{books => book}/add_book_modal.html (100%) rename app/templates/{books => book}/index.html (100%) rename app/templates/{books => book}/view.html (100%) diff --git a/app/templates/base.html b/app/templates/base.html index e5583dc..3da8584 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -75,7 +75,7 @@ {% include 'sidebar.html' %} {% include 'right_sidebar.html' %} - {% include 'books/add_book_modal.html' %} + {% include 'book/add_book_modal.html' %}
diff --git a/app/templates/books/add_book_modal.html b/app/templates/book/add_book_modal.html similarity index 100% rename from app/templates/books/add_book_modal.html rename to app/templates/book/add_book_modal.html diff --git a/app/templates/books/index.html b/app/templates/book/index.html similarity index 100% rename from app/templates/books/index.html rename to app/templates/book/index.html diff --git a/app/templates/books/view.html b/app/templates/book/view.html similarity index 100% rename from app/templates/books/view.html rename to app/templates/book/view.html diff --git a/app/views/book.py b/app/views/book.py index 92f5843..77989af 100644 --- a/app/views/book.py +++ b/app/views/book.py @@ -26,7 +26,7 @@ def get_all(): pagination = create_pagination(total=books.count()) return render_template( - "books/index.html", + "book/index.html", books=books.paginate(page=pagination.page, per_page=pagination.per_page), page=pagination, search_query=q, @@ -56,4 +56,4 @@ def view(book_id): flash("Book not found", "danger") return redirect(url_for("book.get_all")) else: - return render_template("books/view.html", book=b) + return render_template("book/view.html", book=b)