`request.post_vars()` cannot handle multiple values for a key
Open
Beginner friendly
Nobody has claimed this yet.
enhancement
internals
- Dominant language
- Python
- Stars
- 11.5k
- Forks
- 903
- Avg merge
- 4d 17h
- Merged PRs (30d)
- 18
Description
Datasette GET requests often use ?_facet=category&_facet=size - but right now there's no neat way to handle that with POST data, since this code reduces any multiple values to just one.
This came up while working with <select multiple> (enhanced using Choices.js) in:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at datasette/utils/asgi.py lines 138-140 and trace request.post_vars() for repeated POST keys, using the linked datasette-acl multiple-select context as a reproduction. Done means repeated values are preserved rather than reduced to one, matching the need for POST data equivalent to repeated GET parameters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100