diff --git a/README b/README index 8e6b9de..bf06eba 100644 --- a/README +++ b/README @@ -19,6 +19,6 @@ python3 main.py ### TODO: - fix up lame book linkages to tabels that are so not 3nf, *_LST tables, etc. -- use flask-wtf and flask-bootstrap, see this: https://medium.com/better-programming/how-to-use-flask-wtforms-faab71d5a034 for author/ - consider getting rest of Book class connected, e.g. series, loan, etc. - see if we can break this out of main.py -- can't recall what was circular about this, but at least the wtf bits seem to be able to be moved out, so why not do that +- get main.html to be some sort of include so that other htmls, can be clicked on / use back button, reload, etc. and it all works, but the whoel thing feels like a discrete app diff --git a/main.py b/main.py index 1548506..366ccfd 100644 --- a/main.py +++ b/main.py @@ -182,6 +182,9 @@ def author(id): message="" return render_template("author.html", author=author, message=message, author_form=author_form) +@app.route("/", methods=["GET"]) +def main_page(): + return render_template("main.html") if __name__ == "__main__": app.run(host="0.0.0.0", debug=True) diff --git a/templates/authors.html b/templates/authors.html index 0dbdf16..7eaaa27 100644 --- a/templates/authors.html +++ b/templates/authors.html @@ -1,9 +1,13 @@ - - - -

authors

- {% for author in authors %} -

{{author.surname}}, {{author.firstnames}}

- {% endfor %} - - +

Authors

+ + + + + + {% for author in authors %} + + {% endfor %} + +
SurnameFirstname(s)Action
{{author.surname}}{{author.firstnames}} + icons for: E, D +