From db0185ff8516b852aad0a1bdb0cbcee63d28c4d2 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 29 Aug 2013 18:07:04 -0400 Subject: first cut at hybrid url generation; still needs tests for resource_url logic --- CHANGES.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 93349abe6..657c50009 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -232,6 +232,16 @@ Backwards Incompatibilities respectively using the machinery described in the "Internationalization" chapter of the documentation. +- If you send an ``X-Vhm-Root`` header with a value that ends with a slash (or + any number of slashes), the trailing slash(es) will be removed before a URL + is generated when you use use ``request.resource_url`` or + ``request.resource_path``. Previously the virtual root path would not have + trailing slashes stripped, which would influence URL generation. + +- The ``pyramid.interfaces.IResourceURL`` interface has now grown two new + attributes: ``virtual_path_tuple`` and ``physical_path_tuple``. These should + be the tuple form of the resource's path (physical and virtual). + 1.4 (2012-12-18) ================ -- cgit v1.2.3 From 0a4aed1c8e0a6da9219cccb6f55882d916f49916 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 29 Aug 2013 21:58:48 -0400 Subject: documentation for hybrid url generation --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 657c50009..cfa77283f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,12 @@ Next Release Features -------- +- You can now generate "hybrid" urldispatch/traversal URLs more easily + by using the new ``route_name`` and ``route_kw`` arguments to + ``request.resource_url`` and ``request.resource_path``. See the new section + of the "Combining Traversal and URL Dispatch" documentation chapter entitled + "Hybrid URL Generation". + - It is now possible to escape double braces in Pyramid scaffolds (unescaped, these represent replacement values). You can use ``\{\{a\}\}`` to represent a "bare" ``{{a}}``. See -- cgit v1.2.3 From 67674f9609514dc80c15d617f71ef523a2377cfd Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 29 Aug 2013 22:23:49 -0400 Subject: point at docs section --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index cfa77283f..70bc31840 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -157,7 +157,8 @@ Features - The ``pyramid.config.Configurator.add_route`` method now supports being called with an external URL as pattern. See - https://github.com/Pylons/pyramid/issues/611 for more information. + https://github.com/Pylons/pyramid/issues/611 and the documentation section + in the "URL Dispatch" chapter entitled "External Routes" for more information. Bug Fixes --------- -- cgit v1.2.3 From c29603ed0d8fd0b55789eb8f975c901961864d66 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 29 Aug 2013 23:55:36 -0400 Subject: get rid of remainder_name on route, and just default to passing traverse; add route_remainder_name argument to resource_url --- CHANGES.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 70bc31840..d3d3f64ce 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -5,10 +5,10 @@ Features -------- - You can now generate "hybrid" urldispatch/traversal URLs more easily - by using the new ``route_name`` and ``route_kw`` arguments to - ``request.resource_url`` and ``request.resource_path``. See the new section - of the "Combining Traversal and URL Dispatch" documentation chapter entitled - "Hybrid URL Generation". + by using the new ``route_name``, ``route_kw`` and ``route_remainder_name`` + arguments to ``request.resource_url`` and ``request.resource_path``. See + the new section of the "Combining Traversal and URL Dispatch" documentation + chapter entitled "Hybrid URL Generation". - It is now possible to escape double braces in Pyramid scaffolds (unescaped, these represent replacement values). You can use ``\{\{a\}\}`` to -- cgit v1.2.3 From 97ed56d766298ee042305ff8712df5f1fc3fbe3a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 30 Aug 2013 11:48:56 -0400 Subject: allow exception view registrations for HTTPException to override default exception view; closes #985 --- CHANGES.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index d3d3f64ce..334785424 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -163,6 +163,11 @@ Features Bug Fixes --------- +- It was not possible to use ``pyramid.httpexceptions.HTTPException`` as + the ``context`` of an exception view as very general catchall for + http-related exceptions when you wanted that exception view to override the + default exception view. See https://github.com/Pylons/pyramid/issues/985 + - When the ``pyramid.reload_templates`` setting was true, and a Chameleon template was reloaded, and the renderer specification named a macro (e.g. ``foo#macroname.pt``), renderings of the template after the template -- cgit v1.2.3 From c5ed5491e8a6d736bedba45b2cb944799f36a5e4 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 30 Aug 2013 12:18:57 -0400 Subject: add HTTPSuccessful base class, allowing HTTPOk to be caught independently; closes #986 --- CHANGES.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 334785424..b3c4e6a60 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,13 @@ Next Release Features -------- +- A new http exception subclass named ``pyramid.httpexceptions.HTTPSuccessful`` + was added. You can use this class as the ``context`` of an exception + view to catch all 200-series "exceptions" (e.g. "raise HTTPOk"). This + also allows you to catch *only* the ``HTTPOk`` exception itself; previously + this was impossible because a number of other exceptions + (such as ``HTTPNoContent``) inherited from ``HTTPOk``, but now they do not. + - You can now generate "hybrid" urldispatch/traversal URLs more easily by using the new ``route_name``, ``route_kw`` and ``route_remainder_name`` arguments to ``request.resource_url`` and ``request.resource_path``. See @@ -923,6 +930,14 @@ Backwards Incompatibilities finished callbacks are executed. This is in support of the ``request.invoke_subrequest`` feature. +- The 200-series exception responses named ``HTTPCreated``, ``HTTPAccepted``, + ``HTTPNonAuthoritativeInformation``, ``HTTPNoContent``, ``HTTPResetContent``, + and ``HTTPPartialContent`` in ``pyramid.httpexceptions`` no longer inherit + from ``HTTPOk``. Instead they inherit from a new base class named + ``HTTPSuccessful``. This will have no effect on you unless you've registered + an exception view for ``HTTPOk`` and expect that exception view to + catch all the aforementioned exceptions. + Documentation ------------- -- cgit v1.2.3