Bishwas-py / djapy

No bullshit, Django Rest API Framework
https://djapy.io
59 stars 3 forks source link

Accept multiple `list/set` data for form request #26

Closed Bishwas-py closed 2 months ago

Bishwas-py commented 3 months ago

Right now we are converting the QueryDict to a plain python dict using

            if self.request.POST:
                self.data.update(self.request.POST.dict())

and RequestDataParser>parse_request_data is used to assign request data. But in this process multiple data sent from client is lost.

<form method="post">
<select name="participant_ids">...</select>
<select name="participant_ids">...</select>
</form>

only one participants is accepted from the form request.

If schema is or similar:

participant_ids: conset(int, max_length=2)

then it should have the both ids on it.

Bishwas-py commented 2 months ago

27 solved the issue.