Skip to content

Chapter 4: unable to send e-mail address to reset password #98

@Marcial2

Description

@Marcial2

I am getting this exception when I enter an email address for password reset:

NoReverseMatch at /account/password_reset/
Error during template rendering

In template /home/marcia/django3/bookmarks/account/templates/registration/password_reset_email.html, error at line 2
Reverse for 'password_reset_confirm' with keyword arguments '{'uibd64': 'Mg', 'token': 'asbpl2-647b4e4a43445b4f0062656965947400'}' not found. 1 pattern(s) tried: ['account/reset/confirm/(?P[^/]+)/(?P[^/]+)/$']

I am using this path in account/urls.py:
path('reset///', auth_views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'),

Here is my password reset html:
Someone asked for password reset for email {{ email }}. Follow the link below:
{{ protocol }}://{{ domain }}{% url "password_reset_confirm" uibd64=uid token=token %}
Your username, in case you've forgotten: {{ user.get_username }}

It seems to the the html does in fact match the url path, but - despite many tries - I have not been able to make this work.
Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions