Closed StevenWeir038 closed 2 years ago
The answer to this conundrum lay within Django documentation. Querysets
It's abstracted so no need to open database connection, perform actions, close connection.
Applied logic within the bookings/views.py function. Essentially, if a record exists for a specific date AND specific time, the program can branch to tell the user their attempt to create or edit an appointment to the same time cannot be done. The business can only perform one appointment at a time as there is 1 member of staff.
Note, as a small business only one client can be taken at a time.