From 35149b11247846506b31ef3cd6647b659b18f352 Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Sun, 1 Jan 2012 19:13:23 +0100 Subject: [PATCH] Remove fp_changed_success.html, use log in page + notification message instead --- mediagoblin/auth/routing.py | 6 +---- mediagoblin/auth/views.py | 6 ++++- .../mediagoblin/auth/fp_changed_success.html | 27 ------------------- 3 files changed, 6 insertions(+), 33 deletions(-) delete mode 100644 mediagoblin/templates/mediagoblin/auth/fp_changed_success.html diff --git a/mediagoblin/auth/routing.py b/mediagoblin/auth/routing.py index 699ecbe1..ea9388c5 100644 --- a/mediagoblin/auth/routing.py +++ b/mediagoblin/auth/routing.py @@ -35,8 +35,4 @@ auth_routes = [ controller='mediagoblin.auth.views:forgot_password'), Route('mediagoblin.auth.verify_forgot_password', '/forgot_password/verify/', - controller='mediagoblin.auth.views:verify_forgot_password'), - Route('mediagoblin.auth.fp_changed_success', - '/forgot_password/changed_success/', - template='mediagoblin/auth/fp_changed_success.html', - controller='mediagoblin.views:simple_template_render')] + controller='mediagoblin.auth.views:verify_forgot_password')] diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py index f707ecbe..88dc40ad 100644 --- a/mediagoblin/auth/views.py +++ b/mediagoblin/auth/views.py @@ -324,7 +324,11 @@ def verify_forgot_password(request): user.fp_token_expire = None user.save() - return redirect(request, 'mediagoblin.auth.fp_changed_success') + messages.add_message( + request, + messages.INFO, + _("You can now log in using your new password.")) + return redirect(request, 'mediagoblin.auth.login') else: return render_to_response( request, diff --git a/mediagoblin/templates/mediagoblin/auth/fp_changed_success.html b/mediagoblin/templates/mediagoblin/auth/fp_changed_success.html deleted file mode 100644 index 7cea312d..00000000 --- a/mediagoblin/templates/mediagoblin/auth/fp_changed_success.html +++ /dev/null @@ -1,27 +0,0 @@ -{# -# GNU MediaGoblin -- federated, autonomous media hosting -# Copyright (C) 2011 Free Software Foundation, Inc -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -#} -{% extends "mediagoblin/base.html" %} - -{% block mediagoblin_content %} -

- {% trans -%} - Your password has been changed. Try to log in now. - {%- endtrans %} -

-{% endblock %} - -- 2.25.1