blob: 57a80b3f5243aa38e18e04bbfe50d26f6c9845ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
.. _registry_module:
:mod:`pyramid.registry`
---------------------------
.. module:: pyramid.registry
.. autoclass:: Registry
.. attribute:: settings
The dictionary-like :term:`deployment settings` object. See
:ref:`deployment_settings` for information. This object is often
accessed as ``request.registry.settings`` or
``config.registry.settings`` in a typical Pyramid application.
.. attribute:: package_name
.. versionadded:: 1.6
When a registry is set up (or created) by a :term:`Configurator`, this
attribute will be the shortcut for
:attr:`pyramid.config.Configurator.package_name`.
This attribute is often accessed as ``request.registry.package_name`` or
``config.registry.package_name`` or ``config.package_name``
in a typical Pyramid application.
.. attribute:: introspector
.. versionadded:: 1.3
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.
.. seealso::
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.
.. method:: notify(*events)
Fire one or more events. All event subscribers to the event(s)
will be notified. The subscribers will be called synchronously.
This method is often accessed as ``request.registry.notify``
in Pyramid applications to fire custom events. See
:ref:`custom_events` for more information.
.. class:: Introspectable
.. versionadded:: 1.3
The default implementation of the interface
:class:`pyramid.interfaces.IIntrospectable` used by framework exenders.
An instance of this class is created when
:attr:`pyramid.config.Configurator.introspectable` is called.
.. autoclass:: Deferred
.. versionadded:: 1.4
.. autofunction:: undefer
.. versionadded:: 1.4
.. autoclass:: predvalseq
.. versionadded:: 1.4
|