Chris McDonough
2011-02-09 9595236d4f1212323dbf06670a80e6a4fb7c8fcf
refs
author Chris McDonough <chrism@plope.com>
Wednesday, February 9, 2011 08:32 +0100
committer Chris McDonough <chrism@plope.com>
Wednesday, February 9, 2011 08:32 +0100
commit9595236d4f1212323dbf06670a80e6a4fb7c8fcf
tree cd4582e995790a95635e2f07c61a994548f60d7f tree | zip | gz
parent e8e655fecd4b45be571c3da3e5d1a0351353ab61 view | diff
- URL pattern markers used in URL dispatch are permitted to specify a custom
regex. For example, the pattern ``/{foo:\d+}`` means to match ``/12345``
(foo==12345 in the match dictionary) but not ``/abc``. However, custom
regexes in a pattern marker which used squiggly brackets did not work. For
example, ``/{foo:\d{4}}`` would fail to match ``/1234`` and
``/{foo:\d{1,2}}`` would fail to match ``/1`` or ``/11``. One level of
inner squiggly brackets is now recognized so that the prior two patterns
given as examples now work. See also
https://github.com/Pylons/pyramid/issues/#issue/123.

Closes #123
3 files modified
42 ■■■■■ changed files
CHANGES.txt 16 ●●●●● diff | view | raw | blame | history
pyramid/tests/test_urldispatch.py 16 ●●●●● diff | view | raw | blame | history
pyramid/urldispatch.py 10 ●●●●● diff | view | raw | blame | history