summaryrefslogtreecommitdiff
path: root/jimbrella/database.py
AgeCommit message (Collapse)Author
2021-10-24Database.group_by_status lists all statusesFrederick Yin
If there are no umbrellas that are overdue in the database, the behavior was to omit them from the returned dict. Now their values are []. Also, small comment fix.
2021-10-23Database high-level operations no longer require dateFrederick Yin
2021-10-22Mark overdue umbrellas in DatabaseFrederick Yin
2021-10-22Exposed database operations take argument "date"Frederick Yin
Namely, Database.take_away and Database.give_back "date" is an instance of datetime.datatime
2021-10-22Define application-specific exceptionsFrederick Yin
2021-10-20Separate "overdue" from "lent" as a distinct statusFrederick Yin
2021-10-20Add page /admin/umbrellasFrederick Yin
Lists all umbrellas in a table.
2021-10-20Move database utilities to database.pyFrederick Yin
It may not be a good idea to scatter database utilities around utils.py. With this in mind, I moved them to database.py as static methods under the class Database.
2021-10-19Database lockFrederick Yin
Is a lockfile named "$DATABASE_NAME.lock". `Database._write()` prevents race conditions by enforcing the lock, and waiting until a previous lock is released.
2021-10-19Basic database operationsFrederick Yin
Define database format. Implement basic I/O operations and take_away / give_back methods.