Snackbar
Learn how to provide the user with some information about the application using Snackbar.
We'll cover the following
Login Modal View
Let’s look at the modal view, which is used as a login form. Our REST API already supports managing user sessions using the following routes:
/api/login
[POST
]/api/logout
[GET
] (login required)/api/ping
[GET
] (login required)/api/whoami
[GET
] (login required)
Once we can establish a user session, we’ll use that on the client-side to determine whether the user will be allowed to edit data or not, and we’ll update the user interface accordingly.
“User Login” is one of the more involved chapters of the course because of how many places the session management touches. Fortunately, most of it is boilerplate code that we can reuse on other projects once it starts working.
About the application
In this lesson, we’ll install and import the notistack
library in the pymui.py
module.
This is what the application looks like:
Note: To login, use the username
admin
and password123
Get hands-on with 1400+ tech skills courses.