diff options
| author | Chris McDonough <chrism@plope.com> | 2014-05-23 14:57:01 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2014-05-23 14:57:01 -0400 |
| commit | d76bdb514c92ee1fd9b1bd67387d15d34ea28bb3 (patch) | |
| tree | 36784e20002ecc4cb6675901b3cc2bda36e54caa /docs/api | |
| parent | 0c5bb0aa329239df877ccb053280e398766eb434 (diff) | |
| parent | c740e8bd20c049cbab43ce0a1cd5a4533fe6b849 (diff) | |
| download | pyramid-d76bdb514c92ee1fd9b1bd67387d15d34ea28bb3.tar.gz pyramid-d76bdb514c92ee1fd9b1bd67387d15d34ea28bb3.tar.bz2 pyramid-d76bdb514c92ee1fd9b1bd67387d15d34ea28bb3.zip | |
Merge branch 'master' of github.com:Pylons/pyramid
Diffstat (limited to 'docs/api')
| -rw-r--r-- | docs/api/i18n.rst | 2 | ||||
| -rw-r--r-- | docs/api/registry.rst | 5 | ||||
| -rw-r--r-- | docs/api/request.rst | 21 |
3 files changed, 22 insertions, 6 deletions
diff --git a/docs/api/i18n.rst b/docs/api/i18n.rst index 53e8c8a9b..3b9abbc1d 100644 --- a/docs/api/i18n.rst +++ b/docs/api/i18n.rst @@ -7,7 +7,7 @@ .. autoclass:: TranslationString - .. autoclass:: TranslationStringFactory + .. autofunction:: TranslationStringFactory .. autoclass:: Localizer :members: diff --git a/docs/api/registry.rst b/docs/api/registry.rst index 7736cf075..bab3e26ba 100644 --- a/docs/api/registry.rst +++ b/docs/api/registry.rst @@ -21,7 +21,10 @@ 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`. + + .. 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. diff --git a/docs/api/request.rst b/docs/api/request.rst index b7604020e..77d80f6d6 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -250,8 +250,11 @@ ``invoke_subrequest`` isn't *actually* a method of the Request object; it's a callable added when the Pyramid router is invoked, or when a subrequest is invoked. This means that it's not available for use on a - request provided by e.g. the ``pshell`` environment. For more - information, see :ref:`subrequest_chapter`. + request provided by e.g. the ``pshell`` environment. + + .. seealso:: + + See also :ref:`subrequest_chapter`. .. automethod:: has_permission @@ -280,7 +283,11 @@ This property will return the JSON-decoded variant of the request body. If the request body is not well-formed JSON, or there is no body associated with this request, this property will raise an - exception. See also :ref:`request_json_body`. + exception. + + .. seealso:: + + See also :ref:`request_json_body`. .. method:: set_property(callable, name=None, reify=False) @@ -312,7 +319,13 @@ def _connect(request): conn = request.registry.dbsession() - def cleanup(_): + def cleanup(request): + # since version 1.5, request.exception is no + # longer eagerly cleared + if request.exception is not None: + conn.rollback() + else: + conn.commit() conn.close() request.add_finished_callback(cleanup) return conn |
