Remove fp_changed_success.html, use log in page + notification message instead
authorJef van Schendel <mail@jefvanschendel.nl>
Sun, 1 Jan 2012 18:13:23 +0000 (19:13 +0100)
committerJef van Schendel <mail@jefvanschendel.nl>
Sun, 1 Jan 2012 18:13:23 +0000 (19:13 +0100)
mediagoblin/auth/routing.py
mediagoblin/auth/views.py
mediagoblin/templates/mediagoblin/auth/fp_changed_success.html [deleted file]

index 699ecbe15eb90fbfe58ca7028843b92c542c8994..ea9388c598375e2a7930d86fd0f54bb7cfd72cbe 100644 (file)
@@ -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')]
index f707ecbea0006aaa877c3cc907fb939d99d7d93c..88dc40ad016318d8d980ac8f99b86d725b541276 100644 (file)
@@ -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 (file)
index 7cea312..0000000
+++ /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 <http://www.gnu.org/licenses/>.
-#}
-{% extends "mediagoblin/base.html" %}
-
-{% block mediagoblin_content %}
-  <p>
-    {% trans -%}
-      Your password has been changed. Try to log in now.
-    {%- endtrans %}
-  </p>
-{% endblock %}
-