summaryrefslogtreecommitdiff
path: root/docs/narr/hybrid.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2010-01-03 03:39:30 +0000
committerChris McDonough <chrism@agendaless.com>2010-01-03 03:39:30 +0000
commiteecdbc34962b00e35d41039af014462cf558acee (patch)
tree784bfdf054d6f4846fb1817d1ba7b01792792dcc /docs/narr/hybrid.rst
parent1dff935445ff293a7434f074c1f6bb7304174ec2 (diff)
downloadpyramid-eecdbc34962b00e35d41039af014462cf558acee.tar.gz
pyramid-eecdbc34962b00e35d41039af014462cf558acee.tar.bz2
pyramid-eecdbc34962b00e35d41039af014462cf558acee.zip
Features
-------- - The ``Configurator.add_view`` method now accepts an argument named ``context``. This is an alias for the older argument named ``for_``; it is preferred over ``for_``, but ``for_`` will continue to be supported "forever". - The ``view`` ZCML directive now accepts an attribute named ``context``. This is an alias for the older attribute named ``for``; it is preferred over ``for``, but ``for`` will continue to be supported "forever". - The ``Configurator.add_route`` method now accepts an argument named ``view_context``. This is an alias for the older argument named ``view_for``; it is preferred over ``view_for``, but ``view_for`` will continue to be supported "forever". - The ``route`` ZCML directive now accepts an attribute named ``view_context``. This is an alias for the older attribute named ``view_for``; it is preferred over ``view_for``, but ``view_for`` will continue to be supported "forever". Documentation and Paster Templates ---------------------------------- - All uses of the ``Configurator.add_view`` method that used its ``for_`` argument now use the ``context``argument instead. - All uses of the ``Configurator.add_route`` method that used its ``view_for`` argument now use the ``view_context``argument instead. - All uses of the ``view`` ZCML directive that used its ``for`` attribute now use the ``context`` attribute instead. - All uses of the ``route`` ZCML directive that used its ``view_for`` attribute now use the ``view_context`` attribute instead.
Diffstat (limited to 'docs/narr/hybrid.rst')
-rw-r--r--docs/narr/hybrid.rst13
1 files changed, 7 insertions, 6 deletions
diff --git a/docs/narr/hybrid.rst b/docs/narr/hybrid.rst
index 14cb1d4ab..5c3775e59 100644
--- a/docs/narr/hybrid.rst
+++ b/docs/narr/hybrid.rst
@@ -361,12 +361,13 @@ then both the request type and the context type are "more specific"
for the view registration).
What it all boils down to is: if a request that matches a route
-resolves to a view you don't expect it to, use the ``view_for``
-attribute of the ``route`` statement (*or* the ``for`` attribute of
-the ZCML statement that also has a ``route_name`` *or* the equivalent
-``for_`` parameter to the :class:`repoze.bfg.view.bfg_view` decorator
-that also has a ``route_name`` parameter) to name the specific context
-interface you want the route-related view to match.
+resolves to a view you don't expect it to, use the ``view_context``
+attribute of the ``route`` statement (*or* the ``context`` attribute
+of the ZCML statement that also has a ``route_name`` *or* the
+equivalent ``context`` parameter to the
+:class:`repoze.bfg.view.bfg_view` decorator that also has a
+``route_name`` parameter) to name the specific context interface you
+want the route-related view to match.
Yes, that was as painful for me to write as it was for you to read.