diff options
| author | Chris McDonough <chrism@plope.com> | 2011-12-04 19:27:46 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2011-12-04 19:27:46 -0500 |
| commit | 5d462f0c660f939c773862b0fab81728c9ba62c7 (patch) | |
| tree | 658df249d53de844c2f422ab04c4c26ee4feb86d /docs/api | |
| parent | d5666e630a08c943a22682540aa51174cee6851f (diff) | |
| parent | a78b58dd5cf665f7a7aaa18e9e7f6cae3fc7f749 (diff) | |
| download | pyramid-5d462f0c660f939c773862b0fab81728c9ba62c7.tar.gz pyramid-5d462f0c660f939c773862b0fab81728c9ba62c7.tar.bz2 pyramid-5d462f0c660f939c773862b0fab81728c9ba62c7.zip | |
merge feature.introspection branch
Diffstat (limited to 'docs/api')
| -rw-r--r-- | docs/api/config.rst | 17 | ||||
| -rw-r--r-- | docs/api/interfaces.rst | 8 | ||||
| -rw-r--r-- | docs/api/registry.rst | 30 |
3 files changed, 55 insertions, 0 deletions
diff --git a/docs/api/config.rst b/docs/api/config.rst index a8c193b60..dbfbb1761 100644 --- a/docs/api/config.rst +++ b/docs/api/config.rst @@ -94,6 +94,23 @@ .. automethod:: set_renderer_globals_factory(factory) + .. attribute:: introspectable + + A shortcut attribute which points to the + :class:`pyramid.registry.Introspectable` class (used during + directives to provide introspection to actions). + + This attribute is new as of :app:`Pyramid` 1.3. + + .. attribute:: introspector + + The :term:`introspector` related to this configuration. It is an + instance implementing the :class:`pyramid.interfaces.IIntrospector` + interface. If the Configurator constructor was supplied with an + ``introspector`` argument, this attribute will be that value. + Otherwise, it will be an instance of a default introspector type. + + This attribute is new as of :app:`Pyramid` 1.3. .. attribute:: global_registries diff --git a/docs/api/interfaces.rst b/docs/api/interfaces.rst index b336e549d..5b190b53b 100644 --- a/docs/api/interfaces.rst +++ b/docs/api/interfaces.rst @@ -68,3 +68,11 @@ Other Interfaces .. autointerface:: IResponse :members: + .. autointerface:: IIntrospectable + :members: + + .. autointerface:: IIntrospector + :members: + + .. autointerface:: IActionInfo + :members: diff --git a/docs/api/registry.rst b/docs/api/registry.rst index 4d327370a..25192f3ed 100644 --- a/docs/api/registry.rst +++ b/docs/api/registry.rst @@ -14,3 +14,33 @@ accessed as ``request.registry.settings`` or ``config.registry.settings`` in a typical Pyramid application. + .. attribute:: introspector + + When a registry is set up (or created) by a :term:`Configurator`, the + registry will be decorated with an instance named ``introspector`` + implementing the :class:`pyramid.interfaces.IIntrospector` interface. + See also :attr:`pyramid.config.Configurator.introspector``. + + When a registry is created "by hand", however, this attribute will not + exist until set up by a configurator. + + This attribute is often accessed as ``request.registry.introspector`` in + a typical Pyramid application. + + This attribute is new as of :app:`Pyramid` 1.3. + +.. class:: Introspectable + + The default implementation of the interface + :class:`pyramid.interfaces.IIntrospectable` used by framework exenders. + An instance of this class is is created when + :attr:`pyramid.config.Configurator.introspectable` is called. + + This class is new as of :app:`Pyramid` 1.3. + +.. class:: noop_introspector + + An introspector which throws away all registrations, useful for disabling + introspection altogether (pass as ``introspector`` to the + :term:`Configurator` constructor). + |
