Ticket #8451: fix_password_reset_confirm_path.diff

File fix_password_reset_confirm_path.diff, 1.8 KB (added by Richard Davies <richard.davies@…>, 16 years ago)
  • django/contrib/admin/templates/registration/password_reset_email.html

     
    44
    55{% trans "Please go to the following page and choose a new password:" %}
    66{% block reset_link %}
    7 {{ protocol }}://{{ domain }}/reset/{{ uid }}-{{ token }}/
     7{{ protocol }}://{{ domain }}{{ path }}
    88{% endblock %}
    99{% trans "Your username, in case you've forgotten:" %} {{ user.username }}
    1010
  • django/contrib/auth/forms.py

     
    22from django.contrib.auth import authenticate
    33from django.contrib.auth.tokens import default_token_generator
    44from django.contrib.sites.models import Site
     5from django.core.urlresolvers import reverse
    56from django.template import Context, loader
    67from django import forms
    78from django.utils.translation import ugettext_lazy as _
     
    117118            c = {
    118119                'email': user.email,
    119120                'domain': domain,
     121                'path': reverse('django.contrib.auth.views.password_reset_confirm',
     122                                args=[int_to_base36(user.id), token_generator.make_token(user)]),
    120123                'site_name': site_name,
    121                 'uid': int_to_base36(user.id),
    122124                'user': user,
    123                 'token': token_generator.make_token(user),
    124125                'protocol': use_https and 'https' or 'http',
    125126            }
    126127            send_mail(_("Password reset on %s") % site_name,
Back to Top