-
Notifications
You must be signed in to change notification settings - Fork 450
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use callback to set plugin module path for template location
This is a much cleaner (I think) approach to the problem of figuring out the plugin's template path (see #3701). We use yaspy's ability to provide a callback when loading the plugins. The callback is passed a `yaspy.PluginInfo` instance, which conveniently contains a reference to the plugin object itself, and its filesystem path. So we can just add a method on our plugin class to set the filesystem path as an attribute, and have the callback function call that method. Signed-off-by: Adam Williamson <[email protected]>
- Loading branch information
Showing
2 changed files
with
22 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters