Search code examples
pythondjangourldjango-formsdjango-registration

How can I get the rest of a django-registration password reset form?


I found a mostly complete set of templates for the django-registration package, but the password reset page is incomplete. The file has only:

{{ form }}

which expands to:

<tr><th><label for="id_email">Email:</label></th><td><input id="id_email" maxlength="254" name="email" type="text" /></td></tr>

I can supply the missing TABLE tag, but I don't know what to supply for the action on the missing FORM tag.

(I tried to look through the URLs.py, and found the following which seems relevant, but I don't quite see how to reconstruct what I want, the specific value for the form action.)

                   #url(r'^password/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
                       #auth_views.password_reset_confirm,

Suggestions for how to fill this out?


Solution

  • The relevant view for the password reset form can be found here: https://github.com/django/django/blob/9af7e18f3579df18625b9eda70735790f23aeb96/django/contrib/auth/views.py#L133