diff options
| author | Michael Merickel <github@m.merickel.org> | 2018-11-12 20:07:15 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-12 20:07:15 -0600 |
| commit | 7429fcb5a96aa10bbe86da08bd0b30c9292efdde (patch) | |
| tree | 548defadbf50447b4e6a0b1f9363f3d08ded8bfc /CHANGES.rst | |
| parent | 420ea05bee3ad376c4369f401b2696b31312c5e1 (diff) | |
| parent | 2d32ae81abc473fb21b4bc42aec479c656693f1c (diff) | |
| download | pyramid-7429fcb5a96aa10bbe86da08bd0b30c9292efdde.tar.gz pyramid-7429fcb5a96aa10bbe86da08bd0b30c9292efdde.tar.bz2 pyramid-7429fcb5a96aa10bbe86da08bd0b30c9292efdde.zip | |
Merge pull request #3420 from mmerickel/bare-route-prefix-2
support inherit_slash=True on add_route
Diffstat (limited to 'CHANGES.rst')
| -rw-r--r-- | CHANGES.rst | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/CHANGES.rst b/CHANGES.rst index 73562c003..7772ac7e2 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -12,6 +12,25 @@ Features documentation for more information about why this change was made. See https://github.com/Pylons/pyramid/pull/3413 +- It is now possible to control whether a route pattern contains a trailing + slash when it is composed with a route prefix using + ``config.include(..., route_prefix=...)`` or + ``with config.route_prefix_context(...)``. This can be done by specifying + an empty pattern and setting the new argument + ``inherit_slash=True``. For example: + + .. code-block:: python + + with config.route_prefix_context('/users'): + config.add_route('users', '', inherit_slash=True) + + In the example, the resulting pattern will be ``/users``. Similarly, if the + route prefix were ``/users/`` then the final pattern would be ``/users/``. + If the ``pattern`` was ``'/'``, then the final pattern would always be + ``/users/``. This new setting is only available if the pattern supplied + to ``add_route`` is the empty string (``''``). + See https://github.com/Pylons/pyramid/pull/3420 + Bug Fixes --------- |
