Closed copaceticmumbojumbo closed 1 month ago
Yes if you just have the one table, it'll be called Items
. It you want more and/or different names, pass in the tbls
dict, where the keys are table names.
Could you show how to pass in the tbls dict? Im confused.
Is the 'items' table supposed to be hardcoded into fastapp.py?
I ran into the issue when trying to display content from a separate table i created manually into the db. No matter how I called it, it never seemed to get the table I want. It also auto created an 'items' table to which my test data was inserted.
Please find the sample code below. I was bulding atop the example todo code.
The database buds has one table named 'students' with columns id and name. An 'items' table was created when I ran the code. I tried deleting it and trying again, but it reappeared when rerun. So I thought there must be some hardcodings and searched for 'items' in fastapp.py, and voila, there it was, being mentioned twice under the fast_app() function.
PS: Im playing with the db using Pycharms inbuilt db viewer.