mirror of
https://github.com/simonw/datasette.git
synced 2026-06-14 21:16:56 +02:00
Merge a759c47c9e into 911954347e
This commit is contained in:
commit
d1cead50b0
8 changed files with 62 additions and 21 deletions
|
|
@ -56,6 +56,7 @@ Bug fixes
|
|||
|
||||
- Fixed a bug where visiting ``/<database>/-/query`` without a ``?sql=`` parameter returned a 500 error. (:issue:`2743`)
|
||||
- The ``datasette inspect`` command now correctly records row counts for tables with more than 10,000 rows. (:issue:`2712`)
|
||||
- ``await request.post_vars()`` now returns a :ref:`MultiParams <internals_multiparams>` object instead of a ``dict``, so multiple values for the same form field are preserved. Use ``.getlist(key)`` to retrieve every value. Existing ``post_vars[key]`` access continues to work, but now returns the *first* submitted value rather than the *last* (matching ``request.args`` semantics). (:issue:`2425`)
|
||||
|
||||
.. _v1_0_a30:
|
||||
|
||||
|
|
|
|||
|
|
@ -103,8 +103,8 @@ The object also has the following awaitable methods:
|
|||
|
||||
Don't forget to read about :ref:`internals_csrf`!
|
||||
|
||||
``await request.post_vars()`` - dictionary
|
||||
Returns a dictionary of form variables that were submitted in the request body via ``POST`` using ``application/x-www-form-urlencoded`` encoding. For multipart forms or file uploads, use ``request.form()`` instead.
|
||||
``await request.post_vars()`` - MultiParams
|
||||
Returns a :ref:`MultiParams <internals_multiparams>` object of form variables that were submitted in the request body via ``POST`` using ``application/x-www-form-urlencoded`` encoding. This has the same shape as ``request.args``, so use ``.getlist(key)`` to retrieve every value submitted for keys with multiple values (such as ``<select multiple>`` fields). For multipart forms or file uploads, use ``request.form()`` instead.
|
||||
|
||||
``await request.post_body()`` - bytes
|
||||
Returns the un-parsed body of a request submitted by ``POST`` - useful for things like incoming JSON data.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue