Ticket #18996: 18996-1.diff

File 18996-1.diff, 1.4 KB (added by Tomáš Ehrlich, 12 years ago)

Improved documentation

  • docs/topics/db/models.txt

    diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt
    index f29cc28..a0a4a55 100644
    a b built-in model methods, adding new arguments. If you use ``*args,  
    762762**kwargs`` in your method definitions, you are guaranteed that your
    763763code will automatically support those arguments when they are added.
    764764
    765 .. admonition:: Overriding Delete
    766 
    767     Note that the :meth:`~Model.delete()` method for an object is not
    768     necessarily called when :ref:`deleting objects in bulk using a
    769     QuerySet<topics-db-queries-delete>`. To ensure customized delete logic
    770     gets executed, you can use :data:`~django.db.models.signals.pre_delete`
    771     and/or :data:`~django.db.models.signals.post_delete` signals.
     765.. admonition:: Overridden model methods are not called on bulk operations
     766
     767    Note that the :meth:`~Model.save()` and :meth:`~Model.delete()` methods
     768    for an object are not called when :ref:`updating<topics-db-queries-update>`
     769    and :ref:`deleting<topics-db-queries-delete>` objects in bulk using a
     770    Queryset. To ensure customized save and delete logic
     771    gets executed, you can use :data:`~django.db.models.signals.pre_save`,
     772    :data:`~django.db.models.signals.post_save`,
     773    :data:`~django.db.models.signals.pre_delete`
     774    or :data:`~django.db.models.signals.post_delete` signals.
    772775
    773776Executing custom SQL
    774777--------------------
Back to Top