Text tweaks for "PLUGIN_PATH as list" feature

This commit is contained in:
Justin Mayer 2014-04-18 13:21:06 -07:00
commit f0802e8114
2 changed files with 6 additions and 6 deletions

View file

@ -20,12 +20,12 @@ Alternatively, another method is to import them and add them to the list::
from package import myplugin from package import myplugin
PLUGINS = [myplugin,] PLUGINS = [myplugin,]
If your plugins are not in an importable path, you can specify a ``PLUGIN_PATH`` If your plugins are not in an importable path, you can specify a list of paths
in the settings. ``PLUGIN_PATH`` can be an absolute path or a path relative to via the ``PLUGIN_PATH`` setting. As shown in the following example, paths in
the settings file:: the ``PLUGIN_PATH`` list can be absolute or relative to the settings file::
PLUGIN_PATH = ["list", "of", plugins path"] PLUGIN_PATH = ["plugins", "/srv/pelican/plugins"]
PLUGINS = ["list", "of", "plugins"] PLUGINS = ["assets", "liquid_tags", "sitemap"]
Where to find plugins Where to find plugins
===================== =====================

View file

@ -144,7 +144,7 @@ def read_settings(path=None, override=None):
local_settings[p] = absp local_settings[p] = absp
if isinstance(local_settings['PLUGIN_PATH'], six.string_types): if isinstance(local_settings['PLUGIN_PATH'], six.string_types):
logger.warning("Detected misconfiguration with %s setting ""(must be a list)" % 'PLUGIN_PATH') logger.warning("Defining %s setting as string has been deprecated (should be a list)" % 'PLUGIN_PATH')
local_settings['PLUGIN_PATH'] = [local_settings['PLUGIN_PATH']] local_settings['PLUGIN_PATH'] = [local_settings['PLUGIN_PATH']]
else: else:
if 'PLUGIN_PATH' in local_settings and local_settings['PLUGIN_PATH'] is not None: if 'PLUGIN_PATH' in local_settings and local_settings['PLUGIN_PATH'] is not None: