On Tue, 2020-04-14 at 16:21 +1000, Daniel Axtens wrote:
> mpe and jk and sfr found that the OzLabs server was melting due
> to some queries downloading every patch.
> 
> Turns out if you 404 the patch detail view in the API, d-r-f attempts
> to render a listbox with every single patch to fill in the 'related'
> field. The bundle API also has a similar field.
> 
> Replace the multiple selection box with a text field. You can still
> (AIUI) populate the relevant patch IDs manually.
> 
> Reported-by: Jeremy Kerr <j...@ozlabs.org>
> Reported-by: Michael Ellerman <m...@ellerman.id.au>
> Reported-by: Stephen Rothwell <s...@canb.auug.org.au>
> Signed-off-by: Daniel Axtens <d...@axtens.net>

It's a crying shame that DRF doesn't provide any AJAX'y widgets out of
the box, though I guess that would involve choosing a framework since
JQuery is dying. Given they don't, this is the correct solution. Even
the docs [1] say so!

Reviewed-by: Stephen Finucane <step...@that.guru>

Stephen

PS: It would be nice to include [1] in the commit message when merging.

[1] 
https://www.django-rest-framework.org/topics/browsable-api/#handling-choicefield-with-large-numbers-of-items

_______________________________________________
Patchwork mailing list
Patchwork@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to