Skip to content
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

django.urls.exceptions.NoReverseMatch: 'password_reset' is not a registered namespace #126

Open
DevWonder01 opened this issue Jan 22, 2021 · 6 comments

Comments

@DevWonder01
Copy link

I have followed all the necessary steps involved in installing and configuring this module

Here's My Url - path('api/password_reset/', include('django_rest_passwordreset.urls', namespace='password_reset')),

but i still get this error ,please help me fix this
i need it asap

@loganknecht
Copy link

I am experiencing this issue as well.

Does anyone have guidance on what needs to be done to make the namespace work?

@DevWonder01
Copy link
Author

I am experiencing this issue as well.

Does anyone have guidance on what needs to be done to make the namespace work?

I'm working on something to fix this issue with another alternative ,i will let you know as soon as it's ready

@DevWonder01
Copy link
Author

Guys Please help if you know the solution or can offer a guide

@loganknecht
Copy link

@ArcBase My solution was to not use this library.

I did this

  1. Make an endpoint for the password reset start
  2. Do typical request validation
  3. Fire off an email through mail chimp. The email includes a url that has the token and email embedded in it
  4. Open the URL in the front-end and fill in the correct data using the token and email
  5. Submit form on front end with the pre-filled data and the new password
  6. Receive request in the API to reset
  7. Validate reset request
  8. Return success or failure

I created a simple model called ResetForgottenPassword which doesn't store the token, but does track creation and expiration date of the token itself, and then uses that to help logic.

Not sure if this helps, but it's a lot more obvious and easier to debug than this library.

@DevWonder01
Copy link
Author

@ArcBase My solution was to not use this library.

I did this

  1. Make an endpoint for the password reset start
  2. Do typical request validation
  3. Fire off an email through mail chimp. The email includes a url that has the token and email embedded in it
  4. Open the URL in the front-end and fill in the correct data using the token and email
  5. Submit form on front end with the pre-filled data and the new password
  6. Receive request in the API to reset
  7. Validate reset request
  8. Return success or failure

I created a simple model called ResetForgottenPassword which doesn't store the token, but does track creation and expiration date of the token itself, and then uses that to help logic.

Not sure if this helps, but it's a lot more obvious and easier to debug than this library.

ok thanks alot , i was working on something very similar to this too

@Gagaro
Copy link

Gagaro commented Aug 15, 2021

I had the same issue as well. It happens because my urls are in another namespace, so the password_reset namespace was indeed incorrect.

I changed reverse('password_reset:reset-password-confirm') to reverse('user:password_reset:reset-password-confirm') to include my own namespace and it solved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants