Open 5parkp1ug opened 6 years ago
'account_reset_password_from_key' is a url name included in 'django-allauth' framework. Django-rest-auth uses allauth to send reset emails. SO you need to install django-allauth and add its urls.
I am too having this problem. NoReverseMatch at /rest-auth/password/reset/ Reverse for 'password_reset_confirm' not found. 'password_reset_confirm' is not a valid view function or pattern name. I have installed django-allauth also.
I also encountered the problem "Reverse for 'account_reset_password_from_key' not found. " I fixed the problem by adding allauth urls to urlpatterns:
urls.py
urlpatterns = [
...
path('accounts/', include('allauth.urls')),
}
To anyone still encountering this issue after trying the above solutions, check number 2 out from the FAQ:
I get an error: Reverse for ‘password_reset_confirm’ not found. You need to add password_reset_confirm url into your urls.py (at the top of any other included urls). Please check the urls.py module inside demo app example for more details.
Here's the line in the demo that it's referring to: https://github.com/Tivix/django-rest-auth/blob/master/demo/demo/urls.py#L34
I also was having this problem, and found this github issue it said we need to add
url(r'^', include('django.contrib.auth.urls')),
I have been trying to setup password reset functionality in DRF using django-rest-auth. Earlier I was getting error TemplateDoesNotExist:registration/password_reset_email.html which I resolved by adding the following code code
serializer.py -
settings.py -
However, Now I am getting into another issue - "NoReverseMatch: Reverse for 'account_reset_password_from_key' not found. 'account_reset_password_from_key' is not a valid view function or pattern name.". And haven't found any solution or workaround for this.
Any help would be appreciated.