diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2014-07-01 01:34:30 +0200 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2014-07-01 01:34:30 +0200 |
commit | 7297e9f7bf39b38216697616ee51269334de09fd (patch) | |
tree | e519620b148879f4dbc91f9b8bb0269e6f29cfec | |
parent | 85de8f7e5a56edb97e36ae2a5ed3c68609b234fe (diff) | |
download | pluginbase-7297e9f7bf39b38216697616ee51269334de09fd.tar.gz |
Use explicit ids
-rw-r--r-- | example/example.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/example/example.py b/example/example.py index 8d46943..44ccdb7 100644 --- a/example/example.py +++ b/example/example.py @@ -26,9 +26,12 @@ class Application(object): self.formatters = {} # and a source which loads the plugins from the "app_name/plugins" - # folder. + # folder. We also pass the application name as identifier. This + # is optional but by doing this out plugins have consistent + # internal module names which allows pickle to work. self.source = plugin_base.make_plugin_source( - searchpath=[get_path('./%s/plugins' % name)]) + searchpath=[get_path('./%s/plugins' % name)], + identifier=self.name) # Here we list all the plugins the source knows about, load them # and the use the "setup" function provided by the plugin to |