From 1de0ed27d9b1c4a41699f1b1dd90fb7259c61072 Mon Sep 17 00:00:00 2001 From: Damien De Paoli Date: Sun, 15 Nov 2020 14:26:52 +1100 Subject: [PATCH] fixed up genres.html, publisers.html to work, tweaked menu structure -- still more placeholders than working for now, but started on an Admin menu to allow dealing with genres, covertypes, conditions, etc. --- main.py | 7 +------ templates/base.html | 17 +++++++++++++++-- templates/genres.html | 8 ++++---- templates/publishers.html | 2 +- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/main.py b/main.py index 30477ce..cf5b373 100644 --- a/main.py +++ b/main.py @@ -120,16 +120,11 @@ def book(id): book_s['sub_book'] = sub_book -# print( "parent book details:" ) -# print( book.parent_ref ) -# print( "child book details:" ) -# print( book.child_ref ) - return render_template("book.html", books=book_s, subs=sub_book ) @app.route("/", methods=["GET"]) def main_page(): - return render_template("main.html") + return render_template("base.html") if __name__ == "__main__": app.run(host="0.0.0.0", debug=True) diff --git a/templates/base.html b/templates/base.html index 1f1a88f..c01335b 100644 --- a/templates/base.html +++ b/templates/base.html @@ -14,31 +14,44 @@ diff --git a/templates/genres.html b/templates/genres.html index 89b73fd..2ae1808 100644 --- a/templates/genres.html +++ b/templates/genres.html @@ -1,14 +1,14 @@ {% extends "base.html" %} {% block main_content %} -

Publishers

+

Genres

- + - {% for publisher in publishers %} - + {% for genre in genres %} + {% endfor %}
SurnameFirstname(s)
Name
{{publisher.name}}
{{genre.name}}
diff --git a/templates/publishers.html b/templates/publishers.html index 89b73fd..f6f8eab 100644 --- a/templates/publishers.html +++ b/templates/publishers.html @@ -4,7 +4,7 @@

Publishers

- + {% for publisher in publishers %}
SurnameFirstname(s)
Name