Give a "proper" view for resending verification email

This commit is contained in:
Christopher Allan Webber 2011-05-31 19:29:36 -05:00
parent d9951a6e03
commit 5866d1a8fb
3 changed files with 38 additions and 8 deletions

View File

@ -30,4 +30,7 @@ auth_routes = [
Route('mediagoblin.auth.verify_email_notice', '/verification_required/',
controller='mediagoblin.auth.views:verify_email_notice'),
Route('mediagoblin.auth.resend_verification', '/resend_verification/',
controller='mediagoblin.auth.views:resend_activation')]
controller='mediagoblin.auth.views:resend_activation'),
Route('mediagoblin.auth.resend_verification_success',
'/resend_verification_success/',
controller='mediagoblin.auth.views:resend_activation_success')]

View File

@ -140,6 +140,7 @@ def logout(request):
return exc.HTTPFound(
location=request.urlgen("index"))
def verify_email(request):
"""
Email verification view
@ -183,6 +184,7 @@ def verify_email_notice(request):
template.render(
{'request': request}))
def resend_activation(request):
"""
The reactivation view
@ -215,12 +217,13 @@ def resend_activation(request):
userid=unicode(request.user['_id']),
verification_key=request.user['verification_key'])))
# TODO: For now, we use the successful registration page until we get a
# proper messaging system.
template = request.template_env.get_template(
'mediagoblin/auth/register_success.html')
return exc.HTTPFound(
location=request.urlgen('mediagoblin.auth.register_success'))
location=request.urlgen('mediagoblin.auth.resend_verification_success'))
def resend_activation_success(request):
template = request.template_env.get_template(
'mediagoblin/auth/resent_verification_email.html')
return Response(
template.render(
{'request': request}))

View File

@ -0,0 +1,24 @@
{#
# 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>
Resent your verification email.
</p>
{% endblock %}