summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2008-08-01 16:13:12 +0000
committerLuke Plant <L.Plant.98@cantab.net>2008-08-01 16:13:12 +0000
commit079e5bf1ec7a37497d41d79daa074ac9107bb3ec (patch)
tree1da07c30d1bad806db36b423eb2d08e10dbc1338
parent27d59729166e6d3a9de860c221aa435249294706 (diff)
Added a login link to the password reset completion screen.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8171 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/admin/templates/registration/password_reset_complete.html2
-rw-r--r--django/contrib/auth/views.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/django/contrib/admin/templates/registration/password_reset_complete.html b/django/contrib/admin/templates/registration/password_reset_complete.html
index 446717d38a..fceb167a88 100644
--- a/django/contrib/admin/templates/registration/password_reset_complete.html
+++ b/django/contrib/admin/templates/registration/password_reset_complete.html
@@ -11,4 +11,6 @@
<p>{% trans "Your password has been set. You may go ahead and log in now." %}</p>
+<p><a href="{{ login_url }}">{% trans 'Log in' %}</a></p>
+
{% endblock %}
diff --git a/django/contrib/auth/views.py b/django/contrib/auth/views.py
index 180103ed05..e503f87caa 100644
--- a/django/contrib/auth/views.py
+++ b/django/contrib/auth/views.py
@@ -1,3 +1,4 @@
+from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.auth.decorators import login_required
from django.contrib.auth.forms import AuthenticationForm
@@ -130,7 +131,8 @@ def password_reset_confirm(request, uidb36=None, token=None, template_name='regi
return render_to_response(template_name, context_instance=context_instance)
def password_reset_complete(request, template_name='registration/password_reset_complete.html'):
- return render_to_response(template_name, context_instance=RequestContext(request))
+ return render_to_response(template_name, context_instance=RequestContext(request,
+ {'login_url': settings.LOGIN_URL}))
def password_change(request, template_name='registration/password_change_form.html'):
if request.method == "POST":