Give a "proper" view for resending verification email
This commit is contained in:
parent
d9951a6e03
commit
5866d1a8fb
@ -30,4 +30,7 @@ auth_routes = [
|
|||||||
Route('mediagoblin.auth.verify_email_notice', '/verification_required/',
|
Route('mediagoblin.auth.verify_email_notice', '/verification_required/',
|
||||||
controller='mediagoblin.auth.views:verify_email_notice'),
|
controller='mediagoblin.auth.views:verify_email_notice'),
|
||||||
Route('mediagoblin.auth.resend_verification', '/resend_verification/',
|
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')]
|
||||||
|
@ -140,6 +140,7 @@ def logout(request):
|
|||||||
return exc.HTTPFound(
|
return exc.HTTPFound(
|
||||||
location=request.urlgen("index"))
|
location=request.urlgen("index"))
|
||||||
|
|
||||||
|
|
||||||
def verify_email(request):
|
def verify_email(request):
|
||||||
"""
|
"""
|
||||||
Email verification view
|
Email verification view
|
||||||
@ -183,6 +184,7 @@ def verify_email_notice(request):
|
|||||||
template.render(
|
template.render(
|
||||||
{'request': request}))
|
{'request': request}))
|
||||||
|
|
||||||
|
|
||||||
def resend_activation(request):
|
def resend_activation(request):
|
||||||
"""
|
"""
|
||||||
The reactivation view
|
The reactivation view
|
||||||
@ -215,12 +217,13 @@ def resend_activation(request):
|
|||||||
userid=unicode(request.user['_id']),
|
userid=unicode(request.user['_id']),
|
||||||
verification_key=request.user['verification_key'])))
|
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(
|
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}))
|
||||||
|
@ -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 %}
|
Loading…
x
Reference in New Issue
Block a user