diff --git a/django/conf/global_settings.py b/django/conf/global_settings.py index 797841d297b..811feed3495 100644 --- a/django/conf/global_settings.py +++ b/django/conf/global_settings.py @@ -366,6 +366,9 @@ LOGOUT_URL = '/accounts/logout/' LOGIN_REDIRECT_URL = '/accounts/profile/' +# The number of days a password reset link is valid for +PASSWORD_RESET_TIMEOUT_DAYS = 3 + ########### # TESTING # ########### diff --git a/django/contrib/admin/templates/registration/password_reset_complete.html b/django/contrib/admin/templates/registration/password_reset_complete.html new file mode 100644 index 00000000000..446717d38ae --- /dev/null +++ b/django/contrib/admin/templates/registration/password_reset_complete.html @@ -0,0 +1,14 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} + +{% block breadcrumbs %}
{% endblock %} + +{% block title %}{% trans 'Password reset complete' %}{% endblock %} + +{% block content %} + +{% trans "Your password has been set. You may go ahead and log in now." %}
+ +{% endblock %} diff --git a/django/contrib/admin/templates/registration/password_reset_confirm.html b/django/contrib/admin/templates/registration/password_reset_confirm.html new file mode 100644 index 00000000000..9ba0e5af271 --- /dev/null +++ b/django/contrib/admin/templates/registration/password_reset_confirm.html @@ -0,0 +1,32 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} + +{% block breadcrumbs %} {% endblock %} + +{% block title %}{% trans 'Password reset' %}{% endblock %} + +{% block content %} + +{% if validlink %} + +{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}
+ + + +{% else %} + +{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %} + +{% endif %} + +{% endblock %} diff --git a/django/contrib/admin/templates/registration/password_reset_done.html b/django/contrib/admin/templates/registration/password_reset_done.html index f97b5688c2f..e223bdb9dee 100644 --- a/django/contrib/admin/templates/registration/password_reset_done.html +++ b/django/contrib/admin/templates/registration/password_reset_done.html @@ -9,6 +9,6 @@
{% trans "We've e-mailed a new password to the e-mail address you submitted. You should be receiving it shortly." %}
+{% trans "We've e-mailed you instructions for setting your password to the e-mail address you submitted. You should be receiving it shortly." %}
{% endblock %} diff --git a/django/contrib/admin/templates/registration/password_reset_email.html b/django/contrib/admin/templates/registration/password_reset_email.html index f765dd0670b..3b2d5b0f34d 100644 --- a/django/contrib/admin/templates/registration/password_reset_email.html +++ b/django/contrib/admin/templates/registration/password_reset_email.html @@ -1,15 +1,15 @@ -{% load i18n %} +{% load i18n %}{% autoescape off %} {% trans "You're receiving this e-mail because you requested a password reset" %} {% blocktrans %}for your user account at {{ site_name }}{% endblocktrans %}. -{% blocktrans %}Your new password is: {{ new_password }}{% endblocktrans %} - -{% trans "Feel free to change this password by going to this page:" %} - -http://{{ domain }}/password_change/ - +{% trans "Please go to the following page and choose a new password:" %} +{% block reset_link %} +{{ protocol }}://{{ domain }}/reset/{{ uid }}-{{ token }}/ +{% endblock %} {% trans "Your username, in case you've forgotten:" %} {{ user.username }} {% trans "Thanks for using our site!" %} {% blocktrans %}The {{ site_name }} team{% endblocktrans %} + +{% endautoescape %} diff --git a/django/contrib/admin/templates/registration/password_reset_form.html b/django/contrib/admin/templates/registration/password_reset_form.html index d8c7d03f930..4ecebc77a17 100644 --- a/django/contrib/admin/templates/registration/password_reset_form.html +++ b/django/contrib/admin/templates/registration/password_reset_form.html @@ -9,7 +9,7 @@{% trans "Forgotten your password? Enter your e-mail address below, and we'll reset your password and e-mail the new one to you." %}
+{% trans "Forgotten your password? Enter your e-mail address below, and we'll e-mail instructions for setting a new one." %}