Re: [Django] #10919: Add an option to disable display of related items on admin's delete confirmation page (to prevent large memory usage on complex objects)

2023-04-18 Thread Django
#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:  Ramez
 |  Issac
 Type:  New feature  |   Status:  assigned
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
-+-
Changes (by Ramez Issac):

 * owner:  nobody => Ramez Issac
 * status:  new => assigned


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701879619fab2-397914e2-8752-4dab-aa42-4bbedfc2df00-00%40eu-central-1.amazonses.com.


Re: [Django] #10919: Add an option to disable display of related items on admin's delete confirmation page (to prevent large memory usage on complex objects)

2020-03-17 Thread Django
#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:  master
 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 terminator14):

 I am using Django 2.2.10, and this is still an issue.
 If I am using Django Admin to delete an object with millions of related
 records, it tries to generate the list, takes too long, and my browser
 gives up waiting, showing an error loading the page.

 I'm not sure how difficult this is to do, but I have some thoughts:

 When deleting an object from Django Admin, the summary section is great,
 but I really like the fact that Django Admin lists all effected related
 objects. If the summary section was the only thing on the page, someone
 deleting an object may think "pfft - I know exactly what happens if I
 delete this", and delete it without a second thought, without even
 bothering to glance at the summary of the number of related objects that
 will be effected. I know this sounds like a "that's their problem" type of
 deal, but if we can prevent this, why wouldn't we?

 The list of effected objects that Django Admin currently provides is very
 clear. As soon as the page loads, if you think you are about to delete one
 object, but you see a massive list of effected stuff, you immediately
 start looking into what you are deleting, and why it effects more than
 what you expected.

 I think a good solution would be a middle-ground, rather than disabling
 the list of related objects.

 If you are about to delete an object with a million related objects, have
 django do a DB query with something like "limit 100". It will pull 100
 related objects, quickly generate the HTML page without trying to list a
 million objects on the page, and the user will still have the advantage of
 quickly seeing that his delete operation will effect a ton of objects,
 since he'll have a hundred objects listed on the page.

 To make things clear, add a message at the bottom that says something like
 "and 999,900 others" or something. This will tell them that the 100
 objects listed aren't the only ones to be deleted.

 Any thoughts?

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.8ef80256ef305da32f8e4b8bd68cff8d%40djangoproject.com.


Re: [Django] #10919: Add an option to disable display of related items on admin's delete confirmation page (to prevent large memory usage on complex objects)

2020-01-07 Thread Django
#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:  master
 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 Sivakumar R):

 Replying to [ticket:10919 Tobias McNulty]:
 > I recently tried to delete an object in the admin that had several
 million related objects.
 >
 > The server quickly ran out of memory as the apache process's memory
 usage ballooned upwards to near a gigabyte.
 >
 > I assume this is because it was trying to create an HTML page listing
 out all the related objects.
 >
 > Can the admin page do a count and/or limit to avoid this?
 >
 > I'm using Django 1.1 trunk (r10628), mod_wsgi 2.0, and apache 2.2.8.
 I tried one method. I don't want related objects. So i overrided the
 get_deleted_object() method. But i removed "to_delete =
 collector.nested(format_callback)" line and return just the
 queryset(objs). So it will show only the objects to delete. Is there any
 issue with this method? If there any, please tell me.

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.7ed47827c406e9a089e2bac55685157d%40djangoproject.com.


Re: [Django] #10919: Add an option to disable display of related items on admin's delete confirmation page (to prevent large memory usage on complex objects)

2020-01-07 Thread Django
#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:  master
 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 Sivakumar R):

 Replying to [ticket:10919 Tobias McNulty]:
 > I recently tried to delete an object in the admin that had several
 million related objects.
 >
 > The server quickly ran out of memory as the apache process's memory
 usage ballooned upwards to near a gigabyte.
 >
 > I assume this is because it was trying to create an HTML page listing
 out all the related objects.
 >
 > Can the admin page do a count and/or limit to avoid this?
 >
 > I'm using Django 1.1 trunk (r10628), mod_wsgi 2.0, and apache 2.2.8.
 I tried one method. I don't want related objects. So i overrided the
 get_deleted_object() method. But i removed "to_delete =
 collector.nested(format_callback)" line and return just the
 queryset(objs). So it will show only the objects to delete. Is there any
 issue with this method? If there any, please tell me.

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.62623450e269f67e291155e407f28b49%40djangoproject.com.


Re: [Django] #10919: Add an option to disable display of related items on admin's delete confirmation page (to prevent large memory usage on complex objects)

2018-10-04 Thread Django
#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:  master
 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
+
Changes (by Sergii Lapin):

 * cc: Sergii Lapin (added)


-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.b3fb1f4e1f26f05f5f97b1f639c1e213%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #10919: Add an option to disable display of related items on admin's delete confirmation page (to prevent large memory usage on complex objects)

2018-10-04 Thread Django
#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:  master
 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 Sergii Lapin):

 Actually, removing **deleted_objects** from **context** doesn't prevent
 from collecting related items by
 **django.contrib.admin.utils.NestedObjects** in
 **django.contrib.admin.utils.get_deleted_objects**
 Maybe it better off to override **get_deleted_objects** function (Django
 2+ has this method inside AdminModel class). But there appears new issue:
 How to check permissions and protected foreign keys for related items?..

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.286be4f37064c3d03ff65eb6a49c11bc%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #10919: Add an option to disable display of related items on admin's delete confirmation page (to prevent large memory usage on complex objects)

2016-05-20 Thread Django
#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  |Owner:  nobody
 Type:  New feature |   Status:  new
Component:  contrib.admin   |  Version:  master
 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
+
Changes (by nijel):

 * cc: michal@… (added)


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.dc08d37f4d65ad770fed69ae25453163%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #10919: Add an option to disable display of related items on admin's delete confirmation page (to prevent large memory usage on complex objects)

2016-05-20 Thread Django
#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  |Owner:  nobody
 Type:  New feature |   Status:  new
Component:  contrib.admin   |  Version:  master
 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 nijel):

 Adding such property to ModelAdmin sounds like a good idea.

 I've workarounded it myself by removing deleted_objects before rendering
 the template:

 {{{
 def render_delete_form(self, request, context):
 context['deleted_objects'] = [_('Object listing disabled')]
 return super(ProjectAdmin, self).render_delete_form(request,
 context)
 }}}

 This way I will get the summary (so that user has idea what he is
 deleting), but not object list as it is too long to get displayed.

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.205c8a6e6696a75e6e46f15fd89a329e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #10919: Add an option to disable display of related items on admin's delete confirmation page (to prevent large memory usage on complex objects)

2016-01-31 Thread Django
#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  |Owner:  nobody
 Type:  New feature |   Status:  new
Component:  contrib.admin   |  Version:  master
 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
+
Changes (by sasha0):

 * cc: sasha@… (added)


Comment:

 A property for `ModelAdmin` ?

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.7d75e12b5fabad47a7077a8e05dace2c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #10919: Add an option to disable display of related items on admin's delete confirmation page (to prevent large memory usage on complex objects)

2015-11-29 Thread Django
#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  |Owner:  nobody
 Type:  New feature |   Status:  new
Component:  contrib.admin   |  Version:  master
 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
+
Changes (by darkpixel):

 * cc: aaron@… (added)


--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.e71e651c3ed817879ec28f598b289986%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #10919: Add an option to disable display of related items on admin's delete confirmation page (to prevent large memory usage on complex objects) (was: admin object deletion confirmation p

2015-10-09 Thread Django
#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  |Owner:  nobody
 Type:  New feature |   Status:  new
Component:  contrib.admin   |  Version:  master
 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
+
Changes (by timgraham):

 * version:  1.1-beta => master
 * type:  Bug => New feature


Comment:

 An option to disable or limit the display of related objects on the delete
 confirmation page seems like a workable solution here (other ideas
 welcome).

--
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.a5f86cbb5be33e6e147a80a83f32744a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.