diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-08-15 17:07:14 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-08-15 17:07:14 -0500 |
commit | 97b9b98c1e2571e5617d6a2135d46c4874ac6f51 (patch) | |
tree | bb590f16f317be6cc6a0ba15daaeaab2544df432 /mediagoblin/auth | |
parent | 4834ef8ec21e985290f5e0015ae9452070956170 (diff) | |
parent | cd612ee68902fed1bad981f0c72b338d03fa2aab (diff) | |
download | mediagoblin-97b9b98c1e2571e5617d6a2135d46c4874ac6f51.tar.lz mediagoblin-97b9b98c1e2571e5617d6a2135d46c4874ac6f51.tar.xz mediagoblin-97b9b98c1e2571e5617d6a2135d46c4874ac6f51.zip |
Merge branch 'persona_resquash'
Diffstat (limited to 'mediagoblin/auth')
-rw-r--r-- | mediagoblin/auth/views.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py index d54762b0..dd71d5c1 100644 --- a/mediagoblin/auth/views.py +++ b/mediagoblin/auth/views.py @@ -41,8 +41,11 @@ def register(request): """ if 'pass_auth' not in request.template_env.globals: redirect_name = hook_handle('auth_no_pass_redirect') - return redirect(request, 'mediagoblin.plugins.{0}.register'.format( - redirect_name)) + if redirect_name: + return redirect(request, 'mediagoblin.plugins.{0}.register'.format( + redirect_name)) + else: + return redirect(request, 'index') register_form = hook_handle("auth_get_registration_form", request) @@ -73,8 +76,11 @@ def login(request): """ if 'pass_auth' not in request.template_env.globals: redirect_name = hook_handle('auth_no_pass_redirect') - return redirect(request, 'mediagoblin.plugins.{0}.login'.format( - redirect_name)) + if redirect_name: + return redirect(request, 'mediagoblin.plugins.{0}.login'.format( + redirect_name)) + else: + return redirect(request, 'index') login_form = hook_handle("auth_get_login_form", request) |