summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2011-08-12 03:20:33 -0500
committerMichael Merickel <michael@merickel.org>2011-08-12 03:20:33 -0500
commitf882fefeedfda182272554bad33687c82929bddd (patch)
treed829e0db0923af2fc8a9b319040d251d60f909c1 /docs
parent47369747d8050faddd8b98f4cad9f5d0bb263130 (diff)
parent352d516f90ec3420e637cc237e42c4fab081ad17 (diff)
downloadpyramid-f882fefeedfda182272554bad33687c82929bddd.tar.gz
pyramid-f882fefeedfda182272554bad33687c82929bddd.tar.bz2
pyramid-f882fefeedfda182272554bad33687c82929bddd.zip
Merge branch 'fix.tween-graph'
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/hooks.rst16
1 files changed, 12 insertions, 4 deletions
diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst
index cd2109c5c..c8efc057c 100644
--- a/docs/narr/hooks.rst
+++ b/docs/narr/hooks.rst
@@ -949,6 +949,10 @@ Allowable values for ``under`` or ``over`` (or both) are:
- One of the constants :attr:`pyramid.tweens.MAIN`,
:attr:`pyramid.tweens.INGRESS`, or :attr:`pyramid.tweens.EXCVIEW`.
+- An iterable of any combination of the above. This allows the user to specify
+ fallbacks if the desired tween is not included, as well as compatibility
+ with multiple other tweens.
+
Effectively, ``under`` means "closer to the main Pyramid application than",
``over`` means "closer to the request ingress than".
@@ -1000,10 +1004,14 @@ this::
Specifying neither ``over`` nor ``under`` is equivalent to specifying
``under=INGRESS``.
-If an ``under`` or ``over`` value is provided that does not match a tween
-factory dotted name or alias in the current configuration, that value will be
-ignored. It is not an error to provide an ``under`` or ``over`` value that
-matches an unused tween factory.
+If all options for ``under`` (or ``over``) cannot be found in the current
+configuration, it is an error. If some options are specified purely for
+compatibilty with other tweens, just add a fallback of MAIN or INGRESS.
+For example, ``under=('someothertween', 'someothertween2', INGRESS)``.
+This constraint will require the tween to be located under both the
+'someothertween' tween, the 'someothertween2' tween, and INGRESS. If any of
+these is not in the current configuration, this constraint will only organize
+itself based on the tweens that are present.
:meth:`~pyramid.config.Configurator.add_tween` also accepts an ``alias``
argument. If ``alias`` is not ``None``, should be a string. The string will