-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User matching query does not exist. #100
Comments
That's because your User model now has a new related field "password_reset_tokens" added. I believe all your pre-existing users in your database were created before you using this package, those users don't have the related field included. Hence, when you are querying for the users from database, no user is matching to your current new User model with the related field. To solve this, probably deleting all your pre-existing users in database and start fresh would be the easier way ONLY if you don't wanna keep those users anymore. |
Thanks for your reply, but I actually deleted the whole database and migrated again before using it. I did it multiple times, but it didn’t help. Any other idea please? Thanks |
There are 2 ways: 1st way If that doesn't work, then 2nd way: Did you explicitly create ResetPasswordToken and link it to each of your "User" model instance ? You can do it with "post_save" signal:
Again, you might need to clean up your database and migrate again. Then you can try to login see if it works. |
So, if I understand it right, I just deleted User model in admin.py and then put it back. That didn't help. But now, out of nowhere I get different error, now in console when trying to run the app.
I wasn't able to fing any working solution on Google to this problem. Thanks |
To unregister meaning in your admin.py, you will will have something below: #unregister first #then register again |
Hi,
So, I am trying to get this working, but one thing is not working for me. When I reset password, I get response "OK", but when I try to login I get error: "User matching query does not exist."
I really can't figure out why I get this error. I think I did everything right by the guide, only difference is that I don't send email, but I only print it in console.
It looks like it make the user unaccesible, I still see the user in django admin.
Let me know if/what code you need.
Has anyone any idea?
Thanks
The text was updated successfully, but these errors were encountered: