Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-10-31 | Implement ADMIN_MODIFY_DB logs | Frederick Yin | |
When an admin requests /admin/umbrella/edit and the request succeeds, an ADMIN_MODIFY_DB log is kept. `Database.update` will keep track of the updated columns. | |||
2021-10-29 | Database does not keep admin log, checks returner identity | Frederick Yin | |
2021-10-28 | Fix admin logging bug in Database | Frederick Yin | |
Database.give_back keeps log before umbrella data are wiped | |||
2021-10-28 | Database keeps admin log | Frederick Yin | |
2021-10-28 | Remove unused imports | Frederick Yin | |
2021-10-27 | Reformat database.py | Frederick Yin | |
2021-10-27 | Refactor: separate CSV table into new module | Frederick Yin | |
Database is now subclass of CsvTable | |||
2021-10-27 | Provide exception messages | Frederick Yin | |
UmbrellaNotFoundError: serial UmbrellaValueError: field | |||
2021-10-27 | Database.update includes message in exceptions | Frederick Yin | |
2021-10-27 | Separate Lockfile into new class | Frederick Yin | |
2021-10-26 | Wrap static methods in Database in decorator | Frederick Yin | |
2021-10-24 | One major, multiple minor changes to Database | Frederick Yin | |
Major: - New update(umb) method as an interface to _update(umb), with convenience and safeguards. Minor: - New exception: UmbrellaValueError - All datetime objects are cast naive - Database._write(umbrellas) raises exception after performing recovery - human_datetime includes seconds in output | |||
2021-10-24 | Database.group_by_status lists all statuses | Frederick 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-23 | Database high-level operations no longer require date | Frederick Yin | |
2021-10-22 | Mark overdue umbrellas in Database | Frederick Yin | |
2021-10-22 | Exposed database operations take argument "date" | Frederick Yin | |
Namely, Database.take_away and Database.give_back "date" is an instance of datetime.datatime | |||
2021-10-22 | Define application-specific exceptions | Frederick Yin | |
2021-10-20 | Separate "overdue" from "lent" as a distinct status | Frederick Yin | |
2021-10-20 | Add page /admin/umbrellas | Frederick Yin | |
Lists all umbrellas in a table. | |||
2021-10-20 | Move database utilities to database.py | Frederick 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-19 | Database lock | Frederick 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-19 | Basic database operations | Frederick Yin | |
Define database format. Implement basic I/O operations and take_away / give_back methods. |