1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #27272 -- Added an on_delete RESTRICT handler to allow cascading deletions while protecting direct ones.

This commit is contained in:
Daniel Izquierdo
2016-10-10 16:23:35 +09:00
committed by Mariusz Felisiak
parent 4e1d809aa5
commit 89abecc75d
11 changed files with 306 additions and 17 deletions

View File

@@ -199,6 +199,11 @@ Models
values under a certain (database-dependent) limit. Values from ``0`` to
``9223372036854775807`` are safe in all databases supported by Django.
* The new :class:`~django.db.models.RESTRICT` option for
:attr:`~django.db.models.ForeignKey.on_delete` argument of ``ForeignKey`` and
``OneToOneField`` emulates the behavior of the SQL constraint ``ON DELETE
RESTRICT``.
Pagination
~~~~~~~~~~