~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We provide the manager module instance as a global variable that can be
-imported in any module. We also provide a logger instance in the same way.
+imported in any module.
Example:
.. code-block:: python
+ import logging
import cherrypy
- from .. import logger, mgr
+ from .. import mgr
from ..tools import ApiController, RESTController
+ logger = logging.getLogger(__name__)
@ApiController('servers')
class Servers(RESTController):
plugin could be rewritten like this:
.. code-block:: python
-
+
from . import PLUGIN_MANAGER as PM
from . import interfaces as I
from .plugin import SimplePlugin as SP