diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-07-03 07:16:31 -0700 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-07-03 13:49:17 -0500 |
commit | fea0b3b289154c96017021d25b0ed455d6f7f7b4 (patch) | |
tree | 1d290223a12ccf4404375d613123b69df2ef798d /mediagoblin/plugins/openid/__init__.py | |
parent | d66f79031e07447ab22cb19a610f388ff85ce249 (diff) | |
download | mediagoblin-fea0b3b289154c96017021d25b0ed455d6f7f7b4.tar.lz mediagoblin-fea0b3b289154c96017021d25b0ed455d6f7f7b4.tar.xz mediagoblin-fea0b3b289154c96017021d25b0ed455d6f7f7b4.zip |
use template hooks instead of hardcoding in templates
Diffstat (limited to 'mediagoblin/plugins/openid/__init__.py')
-rw-r--r-- | mediagoblin/plugins/openid/__init__.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mediagoblin/plugins/openid/__init__.py b/mediagoblin/plugins/openid/__init__.py index 9803ada6..1ee60fbf 100644 --- a/mediagoblin/plugins/openid/__init__.py +++ b/mediagoblin/plugins/openid/__init__.py @@ -56,6 +56,11 @@ def setup_plugin(): pluginapi.register_routes(routes) pluginapi.register_template_path(os.path.join(PLUGIN_DIR, 'templates')) + pluginapi.register_template_hooks( + {'openid_register_link': 'mediagoblin/plugins/openid/register_link.html', + 'openid_login_link': 'mediagoblin/plugins/openid/login_link.html', + 'openid_edit_link': 'mediagoblin/plugins/openid/edit_link.html'}) + def create_user(register_form): if 'openid' in register_form: @@ -115,8 +120,4 @@ hooks = { 'auth_no_pass_redirect': no_pass_redirect, ('mediagoblin.auth.register', 'mediagoblin/auth/register.html'): add_to_form_context, - ('mediagoblin.auth.login', - 'mediagoblin/auth/login.html'): add_to_form_context, - ('mediagoblin.edit.account', - 'mediagoblin/edit/edit_account.html'): add_to_form_context, } |