mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #14672 - Added admin handling for on_delete=PROTECT. Thanks to jtiai for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15249 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
e01cb07404
commit
93a4d46184
10 changed files with 115 additions and 27 deletions
|
@ -971,7 +971,8 @@ define the details of how the relation works.
|
|||
* :attr:`~django.db.models.CASCADE`: Cascade deletes; the default.
|
||||
|
||||
* :attr:`~django.db.models.PROTECT`: Prevent deletion of the referenced
|
||||
object by raising :exc:`django.db.IntegrityError`.
|
||||
object by raising :exc:`django.db.models.ProtectedError`, a subclass of
|
||||
:exc:`django.db.IntegrityError`.
|
||||
|
||||
* :attr:`~django.db.models.SET_NULL`: Set the :class:`ForeignKey` null;
|
||||
this is only possible if :attr:`null` is ``True``.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue