Cannot login to django admin by a created staff

Hi everyone, I hope you are fine.
I have created a superuser in my django project that access to all of the permissions of the admin page. The problem is that when I add an object to the customized user model and set is_staff = true for that new user and then logout from the admin, I cannot login with the staff user account due to the error that says “please enter correct username and password for the staff acount” despite the matter that the username and password of that staff user are right.
I will thank if anyone help me to solve this problem.

What does your custom User model look like?

How are you creating this new User?

How have you verified that the password is correct? (Have you validated them by testing them in the shell?) Have you also set is_active to True?

Hi dear Mr. Whitesell.
Fortunatey, I have solved my problem.
The solution was that the password did not been hashed before to be saved into the database.
Thanks.