diff options
| author | Chris McDonough <chrism@plope.com> | 2010-11-01 01:09:03 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2010-11-01 01:09:03 -0400 |
| commit | ba471ceceb644b5d60c05a5ffa8216fb4ee8f730 (patch) | |
| tree | 1dbd9132eedd03406b1da73892a7e3021bf69fed | |
| parent | 3a2af35cc39ae4d656ed766cb255342d1abd3641 (diff) | |
| download | pyramid-ba471ceceb644b5d60c05a5ffa8216fb4ee8f730.tar.gz pyramid-ba471ceceb644b5d60c05a5ffa8216fb4ee8f730.tar.bz2 pyramid-ba471ceceb644b5d60c05a5ffa8216fb4ee8f730.zip | |
document IRendererInfo in API docs
| -rw-r--r-- | docs/api/interfaces.rst | 3 | ||||
| -rw-r--r-- | docs/narr/views.rst | 6 | ||||
| -rw-r--r-- | pyramid/interfaces.py | 3 |
3 files changed, 11 insertions, 1 deletions
diff --git a/docs/api/interfaces.rst b/docs/api/interfaces.rst index 2bf55474e..db610308d 100644 --- a/docs/api/interfaces.rst +++ b/docs/api/interfaces.rst @@ -29,3 +29,6 @@ Other Interfaces .. autointerface:: ISessionFactory + .. autointerface:: IRendererInfo + + diff --git a/docs/narr/views.rst b/docs/narr/views.rst index e1983222d..fb500d914 100644 --- a/docs/narr/views.rst +++ b/docs/narr/views.rst @@ -744,7 +744,8 @@ following interface: (the package that was 'current' at the time the renderer was registered), ``type`` (the renderer type name), ``registry`` (the current application registry) and ``settings`` (the - deployment settings dictionary).""" + deployment settings dictionary). + """ def __call__(self, value, system): """ Call a the renderer implementation with the value and @@ -754,6 +755,9 @@ following interface: containing available system values (e.g. ``view``, ``context``, and ``request``). """ +The formal interface definition of the ``info`` object passed to a renderer +factory constructor is available as :class:`pyramid.interfaces.IRendererInfo`. + There are essentially two different kinds of renderer factories: - A renderer factory which expects to accept a :term:`resource specification` diff --git a/pyramid/interfaces.py b/pyramid/interfaces.py index ae322b36c..3b818c3cd 100644 --- a/pyramid/interfaces.py +++ b/pyramid/interfaces.py @@ -492,6 +492,9 @@ class ISession(Interface): NO_PERMISSION_REQUIRED = '__no_permission_required__' class IRendererInfo(Interface): + """ An object implementing this interface is passed to every + :term:`renderer factory` constructor as its only argument (conventionally + named ``info``)""" name = Attribute('The value passed by the user as the renderer name') package = Attribute('The "current package" when the renderer ' 'configuration statement was found') |
