I am currently learning programming and do not have much experience yet. I am making a webapp to manage employees (this is a personal project that I am only doing to learn from and is not going to be used by anyone) and I wanted to have a single admin user. I was wondering where I should store the username/password for that user. Even though this is just a personal project, I would learn more from trying to do it correctly, so that it could theoretically be used by someone.
Currently I am just storing the username and password-hash in the code itself, which I imagine is very bad practice.
So there are several options that you can do. If you are just getting started, for simplicity's sake, I would recommend you checkout Flask-User. For state persistence, I would suggest you work with SQLite through Flask-SQLAlchemy. Don't bother with trying to spool up a whole database server for this.