#10919: Add an option to disable display of related items on admin's delete
confirmation page (to prevent large memory usage on complex objects)
------------------------------------+------------------------------------
     Reporter:  Tobias McNulty      |                    Owner:  nobody
         Type:  New feature         |                   Status:  new
    Component:  contrib.admin       |                  Version:  dev
     Severity:  Normal              |               Resolution:
     Keywords:  admin memory limit  |             Triage Stage:  Accepted
    Has patch:  0                   |      Needs documentation:  0
  Needs tests:  0                   |  Patch needs improvement:  0
Easy pickings:  0                   |                    UI/UX:  0
------------------------------------+------------------------------------
Comment (by Rodrigo Vieira):

 That's a pretty old ticket, but I'd love to give this a go, I think it
 could be a nice QoL improvement.

 For example if we try to delete a model with thousands of children (which
 in turn may be their own children), not only the page may take minutes to
 load and overload the browser, but the delete button is pushed **all the
 way to the bottom**, so the user will have to wait for the page to load
 and the browser to render everything to access the button (maybe even
 moving the delete button UP,  after the summary, could be an improvement?)

 I like @terminator14's idea above of having a limit of, say, 100, and then
 we render something like `...and N more` and the end. Probably the
 cleanest solution is to tweak
 [https://github.com/django/django/blob/main/django/contrib/admin/utils.py#L127
 get_deleted_objects] to truncate the list and do some math to know which
 number to put on the "..and N more" text.

 One thing I'm not sure is where such config value for the limit of nodes
 to list should reside. Would we expect for it to be overridable via
 settings.py?
-- 
Ticket URL: <https://code.djangoproject.com/ticket/10919#comment:14>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019ccf6f9141-6844bd3e-de7a-4ef5-9a8d-ad65854830f7-000000%40eu-central-1.amazonses.com.

Reply via email to