|
|
c675786852
|
remove publisher* from main.py, for now remove ORM complexities for sub_books in books, just do it by hand and cleaned up a few debugs, comments
|
2020-11-15 12:22:41 +11:00 |
|
|
|
29f8189c97
|
fixed bug with route to / now needing to be to base.html, not main.html, then just added publisher (list all/edit 1/deleted button)
|
2020-11-14 15:33:43 +11:00 |
|
|
|
3831c0a03b
|
pulled apart main to make a self-contained author.py... Weird use of importing from __main__ rather than main.py, and ordering the import to after the db object was created seems to be the secret sauce
|
2020-11-14 15:03:37 +11:00 |
|
|
|
f8d31dd325
|
make sure alert is set to success/something, even if we are just getting an author - it was unset in this scenario
|
2020-11-14 14:24:35 +11:00 |
|
|
|
4b84ba8aa7
|
removed debugs, put condition it to detect if saving (supported) or delete (unsupported at present)
|
2020-11-14 12:08:21 +11:00 |
|
|
|
5fd4479555
|
first pass at a token navbar experience
|
2020-11-13 17:55:48 +11:00 |
|
|
|
4d9a2fc7b1
|
removed extraneous bits of schema definitions, cleaned up bug in __repr__ of book_sub_book, and still tinkering with schemas vs raw sql for book sub book linkages that then get passed to the html
|
2020-11-13 17:00:57 +11:00 |
|
|
|
a4dca1dbf5
|
updated README to reflect next steps (will use flask-wtf and flask-boostrap), but proof-of-concept author/<id> works to save to database with a form / POST
|
2020-11-11 19:23:48 +11:00 |
|
|
|
f7ea6870d2
|
okay we can / do have 2 separate instances of objects referring to either the children books (of a book with subbooks) or a parent ref if the book is a sub book of the parent book. Unused for now, but I think this means I could ditch my own raw sql, then we could also remove the ordering in the sql join, and use datatables sorting based on {{parent_ref.book_id}}.{{book.parent_ref.sub_book_num}}
|
2020-11-08 20:00:39 +11:00 |
|
|
|
14749de303
|
okay, using ORM, the book_sub_book_link table is actually linked, it is also being used to force the ordering of the quert - although its probably not needed, as the datatables sort can do it by using sub_book_num and parent_id... Those values are still being put in by hand, so need to think about the parent_id bit... we need it to get the sorting to work. I think the sub_book_num would now be there in the normal book.dump() if I try to put it there -- would need to make sure the appropriate Schema is used of course
|
2020-11-08 19:53:05 +11:00 |
|
|
|
a57d68ecfa
|
made genre use the schemas properly to return actual joined data, not just genre_id. Also made author/publisher/genre all use many=True, while that is nto true for publisher, it makes the jinja code consisten -- Might need to fix this one day if the writing to the database is somehow more automatic and needs it to be an actual one-to-many, not a many-to-many
|
2020-11-08 15:46:59 +11:00 |
|
|
|
c4fe3422a3
|
Keeping flask-marshmallow as its too hard to do my own objects, due to SqlAlchemy using its own list that is not iterable, etc. Added Genre, ALSO, beware table names with an underscore are messed with, and should be explictly defined - found out this the hard way with genre_lst
|
2020-11-08 15:07:36 +11:00 |
|
|
|
8ff7a8ed02
|
first pass of the data required for editing a single book
|
2020-11-06 18:01:17 +11:00 |
|
|
|
1fcd0ed797
|
okay removed sub_book as a formal db.relationship, its too confusing, using raw sql for now. Still need to ensure ordering of sub_books based on book_id, sub_book_num AND need to pass enough sub_book fields that can vary so that jinja2 can show all subs of a book when editing any of them
|
2020-11-06 17:26:50 +11:00 |
|
|
|
1a2555739d
|
half broke version, but its working... need to do the subquery to get list of all real books without subs, but also make sense of how author data is coming through without marshmallow of BookSchema?
|
2020-11-05 20:12:31 +11:00 |
|
|
|
21c792203c
|
added in publisher relationship (via book_publisher_link), removed debug, also removed ma.Nested, not needed?
|
2020-11-04 23:48:09 +11:00 |
|
|
|
2a7cbe5845
|
using font awesome, datatables, bootstrap and fixed so class attributes are serialized via marshmallow and it all works with jinja2 now
|
2020-11-04 19:26:36 +11:00 |
|
|
|
a51db7c9e4
|
initial commit of book library in python with sqlalchemy (as an ORM), flask (for the web server) and jinja2 (as the web template front-end bit)
|
2020-11-03 18:29:41 +11:00 |
|