Ticket #11022: 11022-bulk-delete-warning-r10680.diff

File 11022-bulk-delete-warning-r10680.diff, 1023 bytes (added by Idan Gazit, 15 years ago)
  • docs/ref/contrib/admin/actions.txt

     
    2323:mod:`django.contrib.auth` app:
    2424
    2525.. image:: _images/user_actions.png
     26
     27.. warning::
     28
     29    The "delete selected objects" action uses ``QuerySet.delete()`` for
     30    efficiency reasons, which has some important side-effects. Notably,
     31    your model's ``delete()`` method will not be called in the interests of
     32    efficiency.
    2633   
     34    If you wish to override this behavior, simply write a custom action which
     35    accomplishes deletion in your preferred manner -- for example, by calling
     36    ``Model.delete()`` for each of the selected items.
     37   
     38    For more background on queryset bulk deletion, see the documentation for
     39    :ref:`queryset object deletion <topics-db-queries-delete>`.
     40
    2741Read on to find out how to add your own actions to this list.
    2842
    2943Writing actions
Back to Top