1
messense 2014-05-05 17:41:00 +08:00
url 匹配是不包含 querystring 参数的?
http://stackoverflow.com/questions/6011146/django-urls-regex-for-query-string |
2
alexkh 2014-05-05 18:02:40 +08:00
@messense 确实是这样。
官方文档里有解释,对http://www.example.com/myapp/?page=3之类的请求,URLconf 会寻找myapp/。忽略掉参数及其值。 请见tutorial第三部分,https://docs.djangoproject.com/en/1.6/intro/tutorial03/ |
3
messense 2014-05-05 18:11:28 +08:00
@alexkh 看来我猜的不错,哈哈。cc @larkifly 官方是这样说的:
Note that these regular expressions do not search GET and POST parameters, or the domain name. For example, in a request to http://www.example.com/myapp/, the URLconf will look for myapp/. In a request to http://www.example.com/myapp/?page=3, the URLconf will also look for myapp/. |