Remove fp_changed_success.html, use log in page + notification message instead

This commit is contained in:
Jef van Schendel 2012-01-01 19:13:23 +01:00
parent d8db95e4b7
commit 35149b1124
3 changed files with 6 additions and 33 deletions

View 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')]

View 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,

View File

@ -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 %}