Django Book 翻译
菜单>:
TOC
返回
原文:
This URLpattern will match any URL such as ``/time/plus/2/`` , ``/time/plus/25/`` , or even ``/time/plus/100000000000/`` . Come to think of it, lets limit it so that the maximum allowed offset is 99 hours. That means we want to allow either one- or two-digit numbersin regular expression syntax, that translates into ``\d{1,2}`` :
翻译:
这个URL模式将匹配类似 ``/time/plus/2/`` , ``/time/plus/25/`` ,甚至 ``/time/plus/100000000000/`` 的任何URL。更进一步,让我们把它限制在最大允许99个小时, 这样我们就只允许一个或两个数字,正则表达式的语法就是 ``\d{1,2}`` :
备注:
译者: