Add warnings about imports in the settings file, to avoid breaking the

multiprocessing feature.
This commit is contained in:
Simon Conseil
2014-09-04 22:49:01 +02:00
parent 15091deeb5
commit 52ff2b947d
3 changed files with 20 additions and 6 deletions

View File

@@ -7,15 +7,24 @@ How to use plugins
Plugins must be specified with the ``plugins`` setting:
.. code-block:: python
plugins = ['sigal.plugins.adjust', 'sigal.plugins.copyright']
You can either specify the name of the module which contains the plugin, or
import the plugin before adding it to the list:
.. code-block:: python
from sigal.plugins import copyright
plugins = ['sigal.plugins.adjust', copyright]
You can either specify the name of the module which contains the plugin, or
import the plugin before adding it to the list. The ``plugin_paths`` setting
can be used to specify paths to search for plugins (if they are not in the
python path).
.. note:: Using an import like this will break the multiprocessing feature,
because the settings dict must be serializable. So in most cases you should
prefer the first option.
The ``plugin_paths`` setting can be used to specify paths to search for plugins
(if they are not in the python path).
Write a new plugin
------------------