summaryrefslogtreecommitdiff
path: root/repoze
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-11-23 09:59:24 +0000
committerChris McDonough <chrism@agendaless.com>2009-11-23 09:59:24 +0000
commitf6c1495fa1712cca94de8034afafc73a6790f591 (patch)
tree31ecc863337cbd4bd4fb4ed1f54d0547c366c02a /repoze
parent772ef05cbabd6bcd7b2298938a3e7240eee40a0c (diff)
downloadpyramid-f6c1495fa1712cca94de8034afafc73a6790f591.tar.gz
pyramid-f6c1495fa1712cca94de8034afafc73a6790f591.tar.bz2
pyramid-f6c1495fa1712cca94de8034afafc73a6790f591.zip
Documentation improvements.
Diffstat (limited to 'repoze')
-rw-r--r--repoze/bfg/configuration.py45
1 files changed, 41 insertions, 4 deletions
diff --git a/repoze/bfg/configuration.py b/repoze/bfg/configuration.py
index 2175fdf4e..970edc71c 100644
--- a/repoze/bfg/configuration.py
+++ b/repoze/bfg/configuration.py
@@ -74,8 +74,10 @@ DEFAULT_RENDERERS = (
class Configurator(object):
"""
A Configurator is used to configure a :mod:`repoze.bfg`
- :term:`application registry`. The Configurator accepts two
- arguments: ``registry`` and ``package``.
+ :term:`application registry`. The Configurator accepts a number
+ of arguments: ``registry``, ``package``, ``settings``,
+ ``root_factory``, ``zcml_file``, ``authentication_policy``,
+ ``authorization_policy``, ``renderers`` and ``debug_logger``.
If the ``registry`` argument is passed as a non-``None`` value, it
must be an instance of the :mod:`repoze.bfg.registry.Registry`
@@ -93,11 +95,46 @@ class Configurator(object):
argument, into absolute paths. If ``None`` is passed (the
default), the package is assumed to be the Python package in which
the *caller* of the ``Configurator`` constructor lives.
+
+ If the ``settings`` argument is passed, it should be a Python
+ dictionary representing the deployment settings for this
+ application. These are later retrievable using the
+ ``repoze.bfg.settings.get_settings`` API.
+
+ If the ``root_factory`` argument is passed, it should be an object
+ representing the default :term:`root factory` for your
+ application. If it is ``None``, a default root factory will be
+ used.
+
+ If ``zcml_file`` is passed, it should be a filename relative to
+ the caller package, an absolute filename, or a :term:`resource
+ specification`. The file it refers to should contain
+ :term:`ZCML`. The ZCML represented in this file will be loaded.
+
+ If ``authentication_policy`` is passed, it should be an instance
+ of an :term:`authentication policy`.
+
+ If ``authorization_policy`` is passed, it should be an instance
+ of an :term:`authorization policy`.
+
+ .. note:: A ``ConfigurationError`` will be raised if an
+ authorization policy is supplied without authentication policy
+ also being supplied (authorization requires authentication).
+
+ If ``renderers`` is passed, it should be a list of tuples
+ representing a set of :term:`renderer` factories which should be
+ configured into this application. If it is not passed, a default
+ set of renderer factories is used.
+
+ If ``debug_logger`` is not passed, a default debug logger that
+ logs to stderr will be used. If it is passed, it should be an
+ instance of a ``logging.Logger`` (PEP 282) class.
+
"""
def __init__(self, registry=None, package=None, settings=None,
- root_factory=None, debug_logger=None, zcml_file=None,
+ root_factory=None, zcml_file=None,
authentication_policy=None, authorization_policy=None,
- renderers=DEFAULT_RENDERERS):
+ renderers=DEFAULT_RENDERERS, debug_logger=None):
self.package = package or caller_package()
self.registry = registry
if registry is None: