From bbe7b004be4f7467b396f25527cbbcfcd6c318d2 Mon Sep 17 00:00:00 2001 From: Chris McMacken Date: Tue, 30 Oct 2012 23:17:26 -0500 Subject: [PATCH 1/3] Added clarification on routes ending in optional params --- book/routing.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/book/routing.rst b/book/routing.rst index c67f93031a6..b79038d0d16 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -417,6 +417,12 @@ match, giving the ``page`` parameter a value of ``2``. Perfect. | /blog/2 | {page} = 2 | +---------+------------+ +.. tip:: + + Routes with optional parameters at the end will not match on requests + with a trailing slash (i.e. /blog/). In this case the slash is a separator and + should not be used if the optional parameter isn't passed. + .. index:: single: Routing; Requirements From 579ff9d31fe8b59016fdb33f571a19dcd75a363c Mon Sep 17 00:00:00 2001 From: Chris McMacken Date: Wed, 31 Oct 2012 08:47:18 -0500 Subject: [PATCH 2/3] Fixing indentation --- book/routing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/book/routing.rst b/book/routing.rst index b79038d0d16..d082c20196f 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -420,8 +420,8 @@ match, giving the ``page`` parameter a value of ``2``. Perfect. .. tip:: Routes with optional parameters at the end will not match on requests - with a trailing slash (i.e. /blog/). In this case the slash is a separator and - should not be used if the optional parameter isn't passed. + with a trailing slash (i.e. /blog/). In this case the slash is a separator and + should not be used if the optional parameter isn't passed. .. index:: single: Routing; Requirements From c7b93aaebbad5e5f9d9b11ac018ab7591242c4d2 Mon Sep 17 00:00:00 2001 From: Chris McMacken Date: Wed, 31 Oct 2012 15:14:02 -0500 Subject: [PATCH 3/3] Adding double backticks around blog for formatting --- book/routing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/routing.rst b/book/routing.rst index d082c20196f..5be5911137e 100644 --- a/book/routing.rst +++ b/book/routing.rst @@ -420,7 +420,7 @@ match, giving the ``page`` parameter a value of ``2``. Perfect. .. tip:: Routes with optional parameters at the end will not match on requests - with a trailing slash (i.e. /blog/). In this case the slash is a separator and + with a trailing slash (i.e. ``/blog/``). In this case the slash is a separator and should not be used if the optional parameter isn't passed. .. index::