Ticket #18996: 18996-3.diff

File 18996-3.diff, 1.2 KB (added by Tim Graham, 12 years ago)

Minor tweaks to last patch

  • docs/topics/db/models.txt

    diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt
    index f29cc28..0b7c9d3 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
     765.. admonition:: Overridden model methods are not called on bulk operations
    766766
    767767    Note that the :meth:`~Model.delete()` method for an object is not
    768768    necessarily called when :ref:`deleting objects in bulk using a
    code will automatically support those arguments when they are added.  
    770770    gets executed, you can use :data:`~django.db.models.signals.pre_delete`
    771771    and/or :data:`~django.db.models.signals.post_delete` signals.
    772772
     773    Unfortunately, there isn't a workaround when
     774    :meth:`creating<django.db.models.query.QuerySet.bulk_create>` or
     775    :meth:`updating<django.db.models.query.QuerySet.update>` objects in bulk,
     776    since none of :meth:`~Model.save()`,
     777    :data:`~django.db.models.signals.pre_save`, and
     778    :data:`~django.db.models.signals.post_save` are called.
     779
    773780Executing custom SQL
    774781--------------------
    775782
Back to Top