summaryrefslogtreecommitdiff
path: root/CHANGES.txt
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-04-22 13:45:13 -0400
committerChris McDonough <chrism@plope.com>2011-04-22 13:45:13 -0400
commit1440e9828fcd527ff79de0655ee65d3076f13911 (patch)
tree53637b76d148774c5a7c3b9e103373e33e6c2f9e /CHANGES.txt
parentfeef5257261f3c37f11571a475dbd68f603b144e (diff)
parented7ffe0e2065100f551793b3774656d8bdde0fb0 (diff)
downloadpyramid-1440e9828fcd527ff79de0655ee65d3076f13911.tar.gz
pyramid-1440e9828fcd527ff79de0655ee65d3076f13911.tar.bz2
pyramid-1440e9828fcd527ff79de0655ee65d3076f13911.zip
Merge branch 'mmerickel-disambiguate_add_route'
Diffstat (limited to 'CHANGES.txt')
-rw-r--r--CHANGES.txt24
1 files changed, 24 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index c0108ff3a..9e967e5c5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -162,6 +162,30 @@ Deprecations
``request.response_content_type = 'abc'`` should be changed to
``request.response.content_type = 'abc'``).
+- Passing view-related parameters to
+ ``pyramid.config.Configurator.add_route`` is now deprecated. Previously, a
+ view was permitted to be connected to a route using a set of ``view*``
+ parameters passed to the ``add_route`` method of the Configurator. This
+ was a shorthand which replaced the need to perform a subsequent call to
+ ``add_view``. For example, it was valid (and often recommended) to do::
+
+ config.add_route('home', '/', view='mypackage.views.myview',
+ view_renderer='some/renderer.pt')
+
+ Passing ``view*`` arguments to ``add_route`` is now deprecated in favor of
+ connecting a view to a predefined route via ``Configurator.add_view`` using
+ the route's ``route_name`` parameter. As a result, the above example
+ should now be spelled::
+
+ config.add_route('home', '/')
+ config.add_view('mypackage.views.myview', route_name='home')
+ renderer='some/renderer.pt')
+
+ This deprecation was done to reduce confusion observed in IRC, as well as
+ to (eventually) reduce documentation burden. A deprecation warning is now
+ issued when any view-related parameter is passed to
+ ``Configurator.add_route``.
+
Behavior Changes
----------------