|
|
3fe99148c3
|
moved to using a Get*ById() in condition, covertype, owned files and exposing them in jinja and using them in books.html to fix-up the fact those columns were now raw forein keys (ids)
|
2020-11-22 00:24:11 +11:00 |
|
|
|
9466e61db9
|
moved to using a Get*ById() in condition, covertype, owned files and exposing them in jinja and using them in books.html to fix-up the fact those columns were now raw forein keys (ids)
|
2020-11-22 00:23:18 +11:00 |
|
|
|
1edf5082c7
|
added publisher list in, so publisher in book.html is about done
|
2020-11-21 17:57:06 +11:00 |
|
|
|
b58b968c66
|
added GetPublishers for use in book.html to make a publisher drop-down
|
2020-11-21 17:56:25 +11:00 |
|
|
|
1a598ca59b
|
renamed GetGenreList to GetGenres as it just gets them, does not make the html list as I was originally planning
|
2020-11-21 17:56:05 +11:00 |
|
|
|
8641b3b140
|
first pass at edit/add buttons for publisher
|
2020-11-21 15:08:41 +11:00 |
|
|
|
9dee77b057
|
removed clever code around publiseher/author, etc. it was just too cryptic, and it does not need to be so generic
|
2020-11-21 14:32:38 +11:00 |
|
|
|
52a75e2d71
|
sort genre list by name
|
2020-11-21 13:38:26 +11:00 |
|
|
|
0b712ef7f3
|
cleanup, and dont need to calculate 12/cols, just use col
|
2020-11-21 12:52:30 +11:00 |
|
|
|
bcf5937869
|
add helper function GetGenreList - passes all genres to *.html, so horizontal "list" of checkboxes for book can be created
|
2020-11-21 12:26:38 +11:00 |
|
|
|
151e006154
|
done loan now
|
2020-11-21 12:26:01 +11:00 |
|
|
|
cc99e2e98a
|
add helper function GetGenreList - passes all genres to *.html, so horizontal "list" of checkboxes for book can be created
|
2020-11-21 12:25:45 +11:00 |
|
|
|
feed271c6b
|
use FlaskForm consistently over Form
|
2020-11-21 12:24:56 +11:00 |
|
|
|
191fcf8f9d
|
added in loans support, also particular route for book_for_loan without markup used as div content on loan.html page via ajax load
|
2020-11-18 19:58:55 +11:00 |
|
|
|
d669ef71a4
|
added in loans support, also particular route for book_for_loan without markup used as div content on loan.html page via ajax load
|
2020-11-18 19:58:41 +11:00 |
|
|
|
6a8d2731ac
|
added in new script_content block for scripts to run after main_content, used by load to retrieve books that are associated with the loan. Also added *Loan menu items to navbar
|
2020-11-18 19:58:00 +11:00 |
|
|
|
4ca2183253
|
added quick debug for loan data in books if there
|
2020-11-18 19:57:04 +11:00 |
|
|
|
28d67be19e
|
removed debugs
|
2020-11-18 19:51:30 +11:00 |
|
|
|
296ef4c1f7
|
renamed id_name_form to edit_id_name, then made show_id_name and used it for all appropriate classes. Shaved about 150 LOC / removed 5 x duplication of code :)
|
2020-11-18 12:30:23 +11:00 |
|
|
|
3f33e7f10d
|
cleaned up Form->FlaskForm, for both import line and class *Form(FlaskForm)
|
2020-11-18 12:12:36 +11:00 |
|
|
|
5f46636298
|
created generic id_name_form.html and made condition, covertype, genre, owned, publisher & rating use it for single edit page
|
2020-11-18 12:09:02 +11:00 |
|
|
|
8ebf9b73cb
|
rewrite to be more generic
|
2020-11-18 12:03:02 +11:00 |
|
|
|
f765a18327
|
removed fix_db, fixes.sql, and updated todo
|
2020-11-17 21:30:51 +11:00 |
|
|
|
4ee94337b2
|
missing ; -- last update to fixes.sql, Ill delete it next
|
2020-11-17 21:27:30 +11:00 |
|
Damien De Paoli
|
9544790ffa
|
removed all old *_lst tables, added corresponding new classes, etc. fro covertype, owned, rating, and dropped tables from DB, etc. Updated base.html to use new tables as drop-downs that are set correctly. So far slight hack on BookForm, will finish that after syncing this all back to mara. If I do the sync, and export/import this version of DB, then the fixes.sql and fix_db() code included in main.py can be removed. Finally, lamely added a favicon and a static/ to support it
|
2020-11-17 21:22:15 +11:00 |
|
|
|
8eddce043b
|
quick record of one-off DB fixes needed to reset table names, column names, etc. to be more consistent & 3NF
|
2020-11-16 00:05:43 +11:00 |
|
|
|
757729f159
|
tweaked pagination size to 20 now that navbar takes up so much space, also made pagination choices match
|
2020-11-16 00:05:00 +11:00 |
|
|
|
797e043c20
|
sort table by name
|
2020-11-16 00:04:21 +11:00 |
|
|
|
58695629dc
|
okay, condition* now works, menu to call them works, just testing it out though, so also a BookForm started but unused at present. Finally, tweaked pagination size to 20 now that navbar takes up so much space, also made pagination choices match
|
2020-11-16 00:03:28 +11:00 |
|
|
|
ff749dfdf5
|
put ordering into Author object so fields render as surname before firstname
|
2020-11-16 00:01:33 +11:00 |
|
|
|
1de0ed27d9
|
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.
|
2020-11-15 14:26:52 +11:00 |
|
|
|
e39a4da6a2
|
removed all refs to genre_lst, made genre table confirm to id, name, added classes/routes for genre*, tweaked book format to accommodate multiple authors, etc. still 1-line, but with 12 / num of <authors, etc.> col wide form-controls
|
2020-11-15 14:16:58 +11:00 |
|
|
|
7334e4b622
|
bit of pox code, to go through sub fields like author/publisher, and build readonly links to their edit pages, works. Need to add to books.html - which also only prints the first item - like author anyway
|
2020-11-15 13:29:49 +11:00 |
|
|
|
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 |
|
|
|
79a41b4f0e
|
split out old books into book and books.html, all *.html now using extends and {% block %} in jinja2. So navbar is now present in all URLs
|
2020-11-14 12:09: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 |
|
|
|
3f7fa18253
|
added delete button to form
|
2020-11-14 12:07:36 +11:00 |
|
|
|
b885bf30e4
|
now using jinja2 block / template, rather than jscript to fill content
|
2020-11-14 11:20:52 +11:00 |
|
|
|
5fd4479555
|
first pass at a token navbar experience
|
2020-11-13 17:55:48 +11:00 |
|
|
|
77fd5619f6
|
now using wtforms for fields, formatting is still not right with bootstrap4, but it will have to do
|
2020-11-13 17:07:15 +11:00 |
|
|
|
db47770720
|
now using wtforms for fields, formatting is still not right with bootstrap4, but it will have to do
|
2020-11-13 17:07:02 +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 |
|
|
|
1a036c7f47
|
fixed up missing dependencies when I tested on laptop
|
2020-11-13 16:58:02 +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 |
|