So I built and expense tracker app in tkinter, and the app allows for different users for example, let’s say John has a family, and want’s to be able to switch from his account and other members of accounts to add data or track whatever it may be. In the app it displays data from a sqlite database, and has widgets that show monthly spending and other stats. Let’s say in my code i currently have john’s ID as the current user and now i want to switch to another account. How would i go about implementing the switching of users? Should i use the context object pattern or singelton? And also i need the active users ID throughout my application.
In my previous version of the same project I tried to restart the program with the active_user_id set in a config file.
Izaan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.