Added a temporary verification page informing the user they need

to authenticate.
This commit is contained in:
Aleksandar Micovic
2011-05-30 23:51:30 -04:00
parent 8bfc87e18e
commit 28afb47ca8
4 changed files with 48 additions and 2 deletions

View File

@@ -26,4 +26,6 @@ auth_routes = [
Route('mediagoblin.auth.logout', '/logout/',
controller='mediagoblin.auth.views:logout'),
Route('mediagoblin.auth.verify_email', '/verify_email/',
controller='mediagoblin.auth.views:verify_email')]
controller='mediagoblin.auth.views:verify_email'),
Route('mediagoblin.auth.verify_email_notice', '/verification_required/',
controller='mediagoblin.auth.views:verify_email_notice')]

View File

@@ -168,3 +168,18 @@ def verify_email(request):
{'request': request,
'user': user,
'verification_successful': verification_successful}))
def verify_email_notice(request):
"""
Verify warning view.
When the user tries to do some action that requires their account
to be verified beforehand, this view is called upon!
"""
template = request.template_env.get_template(
'mediagoblin/auth/verification_needed.html')
return Response(
template.render(
{'request': request}))