summaryrefslogtreecommitdiff
path: root/docs/api
diff options
context:
space:
mode:
Diffstat (limited to 'docs/api')
-rw-r--r--docs/api/config.rst5
-rw-r--r--docs/api/registry.rst9
-rw-r--r--docs/api/request.rst46
-rw-r--r--docs/api/view.rst6
4 files changed, 31 insertions, 35 deletions
diff --git a/docs/api/config.rst b/docs/api/config.rst
index 39d504348..48dd2f0b9 100644
--- a/docs/api/config.rst
+++ b/docs/api/config.rst
@@ -52,10 +52,6 @@
.. automethod:: override_asset(to_override, override_with)
- :methodcategory:`Setting Renderer Globals`
-
- .. automethod:: set_renderer_globals_factory(factory)
-
:methodcategory:`Getting and Adding Settings`
.. automethod:: add_settings
@@ -135,3 +131,4 @@
will only exist for the lifetime of the actual applications for which they
are being used.
+.. autoclass:: not_
diff --git a/docs/api/registry.rst b/docs/api/registry.rst
index db348495c..7736cf075 100644
--- a/docs/api/registry.rst
+++ b/docs/api/registry.rst
@@ -29,6 +29,15 @@
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
diff --git a/docs/api/request.rst b/docs/api/request.rst
index 7b843f86e..72abddb68 100644
--- a/docs/api/request.rst
+++ b/docs/api/request.rst
@@ -156,7 +156,7 @@
.. attribute:: matched_route
If a :term:`route` has matched during this request, this attribute will
- be an obect representing the route matched by the URL pattern
+ be an object representing the route matched by the URL pattern
associated with the route. If a route has not matched during this
request, the value of this attribute will be ``None``. See
:ref:`matched_route`.
@@ -190,22 +190,22 @@
:meth:`~pyramid.config.Configurator.set_request_property`) on the
request it's passed.
- - causes a :class:`~pyramid.event.NewRequest` event to be sent at the
+ - causes a :class:`~pyramid.events.NewRequest` event to be sent at the
beginning of request processing.
- - causes a :class:`~pyramid.event.ContextFound` event to be sent
+ - causes a :class:`~pyramid.events.ContextFound` event to be sent
when a context resource is found.
-
+
- Ensures that the user implied by the request passed has the necessary
authorization to invoke view callable before calling it.
- - causes a :class:`~pyramid.event.NewResponse` event to be sent when
- the Pyramid application returns a response.
-
- Calls any :term:`response callback` functions defined within the
request's lifetime if a response is obtained from the Pyramid
application.
+ - causes a :class:`~pyramid.events.NewResponse` event to be sent if a
+ response is obtained.
+
- Calls any :term:`finished callback` functions defined within the
request's lifetime.
@@ -235,24 +235,6 @@
.. automethod:: resource_path
- .. attribute:: response_*
-
- In Pyramid 1.0, you could set attributes on a
- :class:`pyramid.request.Request` which influenced the behavor of
- *rendered* responses (views which use a :term:`renderer` and which
- don't directly return a response). These attributes began with
- ``response_``, such as ``response_headerlist``. If you needed to
- influence response values from a view that uses a renderer (such as the
- status code, a header, the content type, etc) you would set these
- attributes. See :ref:`response_prefixed_attrs` for further discussion.
- As of Pyramid 1.1, assignment to ``response_*`` attrs is deprecated.
- Assigning to one is still supported but will cause a deprecation
- warning to be emitted, and eventually the feature will be removed. For
- new code, instead of assigning ``response_*`` attributes to the
- request, use API of the :attr:`pyramid.request.Request.response`
- object (exposed to view code as ``request.response``) to influence
- rendered response behavior.
-
.. attribute:: json_body
This property will return the JSON-decoded variant of the request
@@ -311,6 +293,20 @@
.. versionadded:: 1.3
+ .. attribute:: localizer
+
+ A :term:`localizer` which will use the current locale name to
+ translate values.
+
+ .. versionadded:: 1.5
+
+ .. attribute:: locale_name
+
+ The locale name of the current request as computed by the
+ :term:`locale negotiator`.
+
+ .. versionadded:: 1.5
+
.. note::
For information about the API of a :term:`multidict` structure (such as
diff --git a/docs/api/view.rst b/docs/api/view.rst
index 21d2bb90d..d8e429552 100644
--- a/docs/api/view.rst
+++ b/docs/api/view.rst
@@ -11,8 +11,6 @@
.. autofunction:: render_view
- .. autofunction:: is_response
-
.. autoclass:: view_config
:members:
@@ -25,8 +23,4 @@
.. autoclass:: forbidden_view_config
:members:
- .. autoclass:: static
- :members:
- :inherited-members:
-