django url映射有什么问题?

django url映射有什么问题?,django,django-urls,Django,Django Urls,我的url.py中有此url url(r'^filter/$', views.filterTest, name="filter-test"), 让GET请求像 /filter/?month=2 但响应是第404页未找到 不知道这有什么问题吗?您是否尝试了不带尾随斜杠的请求 /filter?month=2 将找到类似yoursite.com/filter/02的url/ 在您的视图中,在request.GET对象中查找月份值是否删除?在url中:“^filter/$”@timmy更改了url

我的url.py中有此url

url(r'^filter/$', views.filterTest, name="filter-test"),
让GET请求像

/filter/?month=2
但响应是第404页未找到


不知道这有什么问题吗?

您是否尝试了不带尾随斜杠的请求

/filter?month=2
将找到类似yoursite.com/filter/02的url/


在您的视图中,在request.GET对象中查找月份值

是否删除?在url中:“^filter/$”@timmy更改了url,但未成功
url(r'^filter/(?P<month>\d+)$', views.filterTest, name="filter-test"),