commit/galaxy-central: dannon: Merged in jmchilton/galaxy-central-fork-1 (pull request #450)
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/33c032a19f9a/ Changeset: 33c032a19f9a User: dannon Date: 2014-08-05 16:33:09 Summary: Merged in jmchilton/galaxy-central-fork-1 (pull request #450) Plugin framework enhancements to improve galaxy-ipython. Affected #: 2 files diff -r 626c583781a1d6f2d550fb3c2c4b357f1f3d5273 -r 33c032a19f9af4549a5dfa7a55df7883117b4ea8 lib/galaxy/visualization/registry.py --- a/lib/galaxy/visualization/registry.py +++ b/lib/galaxy/visualization/registry.py @@ -13,6 +13,7 @@ from galaxy.web import url_for from galaxy.web.base import pluginframework +from galaxy.managers import api_keys import logging log = logging.getLogger( __name__ ) @@ -338,6 +339,19 @@ config = self.resource_parser.parse_config( trans, controller, param_confs, query_dict ) return config + def fill_template( self, trans, plugin, template_filename, **kwargs ): + # TODO: As part of a future note plugin registry effort - move this + # override and let VisualizationsRegistry just revert to using parent's + # fill_template. + if 'get_api_key' not in kwargs: + + def get_api_key(): + return api_keys.ApiKeyManager( trans.app ).get_or_create_api_key( trans.user ) + + kwargs[ 'get_api_key' ] = get_api_key + + return super( VisualizationsRegistry, self ).fill_template( trans, plugin, template_filename, **kwargs ) + # ------------------------------------------------------------------- parsing the config file class ParsingException( ValueError ): diff -r 626c583781a1d6f2d550fb3c2c4b357f1f3d5273 -r 33c032a19f9af4549a5dfa7a55df7883117b4ea8 lib/galaxy/web/base/pluginframework.py --- a/lib/galaxy/web/base/pluginframework.py +++ b/lib/galaxy/web/base/pluginframework.py @@ -588,6 +588,9 @@ ``plugin.template_path`` :returns: rendered template """ + if 'plugin_path' not in kwargs: + kwargs[ 'plugin_path'] = os.path.abspath( plugin.path ) + # defined here to be overridden return trans.fill_template( template_filename, template_lookup=plugin.template_lookup, **kwargs ) Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org