Barry Warsaw pushed to branch pr288-vetted at mailman / Mailman Core
Commits:
3572b11c by Barry Warsaw at 2017-08-27T17:04:57-04:00
One last doc cleanup.
- - - - -
3 changed files:
- src/mailman/plugins/docs/intro.rst
- src/mailman/plugins/testing/hooks.cfg
- src/mailman/plugins/testing/rest.cfg
Changes:
=====================================
src/mailman/plugins/docs/intro.rst
=====================================
--- a/src/mailman/plugins/docs/intro.rst
+++ b/src/mailman/plugins/docs/intro.rst
@@ -5,7 +5,7 @@
Mailman defines a plugin as a Python package on ``sys.path`` that provides
components matching the ``IPlugin`` interface. ``IPlugin`` implementations
can define a *pre-hook*, a *post-hook*, and a *REST resource*. Plugins are
-enabled by adding a section to your ``mailman.cfg`` file, such as::
+enabled by adding a section to your ``mailman.cfg`` file, such as:
.. literalinclude:: ../testing/hooks.cfg
@@ -35,8 +35,8 @@ Hooks
Plugins can add initialization hooks, which will be run at two stages in the
initialization process - one before the database is initialized and one after.
-As you can see above, the plugin defines a ``pre_hook()`` method and a
-``post_hook()`` method. These methods are optional.
+These correspond to methods the plugin defines, a ``pre_hook()`` method and a
+``post_hook()`` method. Each of these methods are optional.
Here is a plugin that defines these hooks:
@@ -72,7 +72,7 @@ this::
__init__.py
rules.py
-And the contents of ``rules.py`` looks like::
+And the contents of ``rules.py`` looks like:
.. literalinclude:: ../testing/example/rules/rules.py
@@ -104,13 +104,12 @@ We use this configuration file and the following file
system layout::
__init__.py
rules.py
-Here, ``rules.py`` likes like::
+Here, ``rules.py`` likes like:
.. literalinclude:: ../testing/alternate/rules/rules.py
You can see that this rule has a different name. If we use the
-``alternate.cfg`` configuration file
-::
+``alternate.cfg`` configuration file from above::
>>> config_file = resource_filename(
... 'mailman.plugins.testing', 'alternate.cfg')
@@ -137,8 +136,6 @@ which we can enable with the following configuration file:
.. literalinclude:: ../testing/rest.cfg
-We have this configuration file handy.
-
The plugin defines a ``resource`` attribute that exposes the root of the
plugin's resource tree. The plugin will show up when we navigate to the
``plugin`` resource.
=====================================
src/mailman/plugins/testing/hooks.cfg
=====================================
--- a/src/mailman/plugins/testing/hooks.cfg
+++ b/src/mailman/plugins/testing/hooks.cfg
@@ -1,6 +1,3 @@
[plugin.example]
class: example.hooks.ExamplePlugin
enabled: yes
-
-[logging.plugins]
-propagate: yes
=====================================
src/mailman/plugins/testing/rest.cfg
=====================================
--- a/src/mailman/plugins/testing/rest.cfg
+++ b/src/mailman/plugins/testing/rest.cfg
@@ -2,13 +2,5 @@
class: example.rest.ExamplePlugin
enabled: yes
-[logging.plugins]
-level: debug
-propagate: yes
-
-[logging.http]
-level: debug
-propagate: yes
-
[webservice]
port: 9001
View it on GitLab:
https://gitlab.com/mailman/mailman/commit/3572b11c2d42de0fa749786d35df5e660b21c4b3
---
View it on GitLab:
https://gitlab.com/mailman/mailman/commit/3572b11c2d42de0fa749786d35df5e660b21c4b3
You're receiving this email because of your account on gitlab.com.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org