diff options
| author | Tres Seaver <tseaver@palladion.com> | 2014-03-18 00:43:02 -0400 |
|---|---|---|
| committer | Tres Seaver <tseaver@palladion.com> | 2014-03-18 00:43:02 -0400 |
| commit | da52daa6dea1483177321ff77ba38fe51a3fc213 (patch) | |
| tree | 6e6b0dc49fa4bd30eb879e38013742ee45e96655 | |
| parent | ca3dcdc7f4c0d4a1a836a5d16f191aad4ee460cf (diff) | |
| parent | b6d8cf9c2eb8f7dd03fa3487b8e401940c314fb4 (diff) | |
| download | pyramid-da52daa6dea1483177321ff77ba38fe51a3fc213.tar.gz pyramid-da52daa6dea1483177321ff77ba38fe51a3fc213.tar.bz2 pyramid-da52daa6dea1483177321ff77ba38fe51a3fc213.zip | |
Merge pull request #1275 from thapar/patch-3
Added note to place login/logout route definitions before `/{pagename}` ...
| -rw-r--r-- | docs/tutorials/wiki2/authorization.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/tutorials/wiki2/authorization.rst b/docs/tutorials/wiki2/authorization.rst index 1e5d0dcbf..e3811b338 100644 --- a/docs/tutorials/wiki2/authorization.rst +++ b/docs/tutorials/wiki2/authorization.rst @@ -207,6 +207,19 @@ routes: :linenos: :language: python +.. note:: These lines must be added *before* this ``view_page`` route + definition: + .. literalinclude:: src/authorization/tutorial/__init__.py + :lines: 32 + :linenos: + :language: python + This is because ``view_page``'s route definition uses a catch-all + "replacement marker" ``/{pagename}`` (see :ref:_route_pattern_syntax ) + which will catch any route that was not already caught by any + route listed above it in ``__init__.py``. Hence, for ``login`` and + ``logout`` views to have the opportunity of being matched + (or "caught"), they must be above ``/{pagename}``. + Add Login and Logout Views ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
