Coe*_*eus 4 python django query-parameters
我的网址中有http://127.0.0.1:8000/theme/category/?q=check,hello,如何检索查询参数的值
当我尝试执行操作时query = request.GET.get('q'),只会得到,check但是hello丢失了。
从查询字符串获取检查和问候的任何帮助都将有所帮助
对于URL,http://example.com/blah/?myvar=123&myvar=567您可以这样使用getlist():
request.GET.getlist('myvar')
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2473 次 |
| 最近记录: |