summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Ronacher <armin.ronacher@active-4.com>2014-07-01 01:34:30 +0200
committerArmin Ronacher <armin.ronacher@active-4.com>2014-07-01 01:34:30 +0200
commit7297e9f7bf39b38216697616ee51269334de09fd (patch)
treee519620b148879f4dbc91f9b8bb0269e6f29cfec
parent85de8f7e5a56edb97e36ae2a5ed3c68609b234fe (diff)
downloadpluginbase-7297e9f7bf39b38216697616ee51269334de09fd.tar.gz
Use explicit ids
-rw-r--r--example/example.py7
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