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 <[email protected]> > Reported-by: Michael Ellerman <[email protected]> > Reported-by: Stephen Rothwell <[email protected]> > Signed-off-by: Daniel Axtens <[email protected]>
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 <[email protected]> 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 [email protected] https://lists.ozlabs.org/listinfo/patchwork
