mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
request.args.getlist() returns [] if missing, refs #774
Also added some unit tests for request.args
This commit is contained in:
parent
7ccd55a163
commit
84616a2364
4 changed files with 14 additions and 4 deletions
|
|
@ -276,4 +276,4 @@ Conider the querystring ``?foo=1&foo=2``. This will produce a ``request.args`` t
|
|||
|
||||
Calling ``request.args.get("foo")`` will return the first value, ``"1"``. If that key is not present it will return ``None`` - or the second argument if you passed one, which will be used as the default.
|
||||
|
||||
Calling ``request.args.getlist("foo")`` will return the full list, ``["1", "2"]``.
|
||||
Calling ``request.args.getlist("foo")`` will return the full list, ``["1", "2"]``. If you call it on a missing key it will return ``[]``.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue