Load Computers from Database File #11
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Potlatch-Loggers/ComputerKeeper#11
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When we start our little application, we want all of the computers in the database file to load into the table, right?
So...
Remember how tinydb has that
db.all()
method that returns a list of all the different items in the database? Something like:And remember how the table is a list-of-lists? and how it looked something like this:
Well, we need to make some kind of conversion between those two. I mean, we need to take the list of dictionaries that
tinydb
gives us, and turn that into some kind of list of lists. Shouldn't be too hard!™ ©In a nutshell, we'll need to do a few things.
tinydb
, that way we can use each one to create a new row entry. (since each entry in the database is a unique computer, right?)We were still running into some kind of issue with this. We'll need to look at what's going on with that bug preventing the app from running properly.
Completed
This was fully realized in commit
801d3b4b1d
, now allowing us to load from the database file, and remove computers (both from the table and the DB).