diff --git a/main.py b/main.py index b2de82a..5b84584 100644 --- a/main.py +++ b/main.py @@ -109,7 +109,7 @@ class BookSchema(ma.SQLAlchemyAutoSchema): publisher = ma.Nested(PublisherSchema, many=True) genre = ma.Nested(GenreSchema, many=True) loan = ma.Nested(LoanSchema, many=True) - series = ma.Nested(Book_Series_LinkSchema, many=True) + series = ma.Nested(SeriesSchema, many=True) parent_ref = ma.Nested(Book_Sub_Book_LinkSchema, many=True) child_ref = ma.Nested(Book_Sub_Book_LinkSchema, many=True) class Meta: model = Book diff --git a/templates/book.html b/templates/book.html index 78fa81f..2a184c7 100644 --- a/templates/book.html +++ b/templates/book.html @@ -4,7 +4,7 @@

View/Edit Book

{% set keys = [ 'title', 'author', 'publisher', 'genre', 'owned', 'covertype', 'condition', 'year_published', 'rating', 'notes', 'blurb' ] %} -
+
{% for key in keys %}
@@ -85,7 +85,19 @@ {% endif %}
{% endfor %} + {% if books.series|length %} +
+ + + {% for s in books.series %} + + {% endfor %} +
+ Book {{ SeriesBookNum( s.id, books.id ) }} of {{s.num_books}} in {{s.title}} +
+
+ {% endif %} {% if books.sub_book|length %}

sub_book is defined: {{books.sub_book}}

{% endif %} @@ -99,7 +111,7 @@
{{books.loan[0].firstnames}} {{books.loan[0].surname}}

- Date Lent: {{books.loan[0].date_lent}}
+ When: {{books.loan[0].date_lent}}
Contact: {{books.loan[0].contact_details}}