You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
django.urls.exceptions.NoReverseMatch: Reverse for 'password_reset_reset' with arguments '('NQ:1dYOiG:BKXR_HhymHf7uYTnlDcPHioITOY',)' and keyword arguments '{}' not found. 0 pattern(s) tried: []
#60
I met a problem, and could not find an answer through google or the docs, so that I've to disturb you.
Django: 1.10.1
Python: 3.5.2
When a user tries to reset password, it throws exception:
NoReverseMatch at /pwd_reset/recover/ Reverse for 'password_reset_reset' with arguments '('NQ:1dYOiG:BKXR_HhymHf7uYTnlDcPHioITOY',)' and keyword arguments '{}' not found. 0 pattern(s) tried: []
Request Method: POST
Request URL: http://127.0.0.1:8000/pwd_reset/recover/
Django Version: 1.10.1
Exception Type: NoReverseMatch
Exception Value:
Reverse for 'password_reset_reset' with arguments '('NQ:1dYOiG:BKXR_HhymHf7uYTnlDcPHioITOY',)' and keyword arguments '{}' not found. 0 pattern(s) tried: []
Exception Location: /home/vagrant/.pyenv/versions/venv-3.5.2/lib/python3.5/site-packages/django/urls/resolvers.py in _reverse_with_prefix, line 392
Python Executable: /home/vagrant/.pyenv/versions/venv-3.5.2/bin/python
Python Version: 3.5.2
Python Path:
['/home/vagrant/codes/django_test/mysite',
'/home/vagrant/codes/django_test/mysite',
'/home/vagrant/.pyenv/versions/3.5.2/lib/python35.zip',
'/home/vagrant/.pyenv/versions/3.5.2/lib/python3.5',
'/home/vagrant/.pyenv/versions/3.5.2/lib/python3.5/plat-linux',
'/home/vagrant/.pyenv/versions/3.5.2/lib/python3.5/lib-dynload',
'/home/vagrant/.pyenv/versions/venv-3.5.2/lib/python3.5/site-packages']
Server time: Fri, 21 Jul 2017 03:34:48 +0000
Error during template rendering
In template /home/vagrant/codes/django_test/mysite/templates/password_reset/recovery_email.txt, error at line 7
Reverse for 'password_reset_reset' with arguments '('NQ:1dYOiG:BKXR_HhymHf7uYTnlDcPHioITOY',)' and keyword arguments '{}' not found. 0 pattern(s) tried: []
1 {% load i18n %}{% blocktrans %}Dear {{ username }},{% endblocktrans %}
2
3 {% blocktrans with domain=site.domain %}You -- or someone pretending to be you -- has requested a password reset on {{ domain }}.{% endblocktrans %}
4
5 {% trans "You can set your new password by following this link:" %}
6
7 http{% if secure %}s{% endif %}://{{ site.domain }}{% url "password_reset_reset" token %}
8
9 {% trans "If you don't want to reset your password, simply ignore this email and it will stay unchanged." %}
10
The red words: {% url "password_reset_reset" token %}
But, what caused this question is still a little bit confused:
when I use namespace and app_name, then the template is {% url "pwd_reset:password_reset_reset" token %}. Same exception again.
I had the same problem, just use a relative URL instead {% url "pwd_reset:password_reset_reset" %} something like this: <p><a class="forget" href="../../recover/">¿Olvidaste la contraseña?</a></p>
And in your main urls.py url(r'^/', include('password_reset.urls')),
hi, @brutasse
I met a problem, and could not find an answer through google or the docs, so that I've to disturb you.
Django: 1.10.1
Python: 3.5.2
When a user tries to reset password, it throws exception:
NoReverseMatch at /pwd_reset/recover/
Reverse for 'password_reset_reset' with arguments '('NQ:1dYOiG:BKXR_HhymHf7uYTnlDcPHioITOY',)' and keyword arguments '{}' not found. 0 pattern(s) tried: []
Error during template rendering
In template /home/vagrant/codes/django_test/mysite/templates/password_reset/recovery_email.txt, error at line 7
Reverse for 'password_reset_reset' with arguments '('NQ:1dYOiG:BKXR_HhymHf7uYTnlDcPHioITOY',)' and keyword arguments '{}' not found. 0 pattern(s) tried: []
The red words: {% url "password_reset_reset" token %}
codes:
settings.py:
urls.py
I followed the documentation and wrote the codes above in the project's root settings and urls file.
When I visited the url http://127.0.0.1:8000/pwd_reset/recover/ and submitted a username, then an exception came.
Thank you!
The text was updated successfully, but these errors were encountered: