Skip to content

request.post_vars() cannot handle multiple values for a key #2425

@simonw

Description

@simonw

async def post_vars(self):
body = await self.post_body()
return dict(parse_qsl(body.decode("utf-8"), keep_blank_values=True))

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:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions