#32045: Document that GenericRelation.remove()/clear() delete objects.
-------------------------------------+-------------------------------------
     Reporter:  chgad                |                    Owner:  Asjad
         Type:                       |  Ahmed Khan
  Cleanup/optimization               |                   Status:  new
    Component:  Documentation        |                  Version:  3.1
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  1                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by felixxm):

 * status:  closed => new
 * type:  Bug => Cleanup/optimization
 * component:  contrib.contenttypes => Documentation
 * version:  3.0 => 3.1
 * easy:  0 => 1
 * resolution:  needsinfo =>
 * stage:  Unreviewed => Accepted


Comment:

 `clear()` and `remove()` for `GenericRelation`s delete objects, this is
 how it works since its introduction in
 bca5327b21eb2e3ee18292cbe532d6d0071201d8 (it's mentioned in some comments
 [https://code.djangoproject.com/ticket/21174#comment:4 21174#comment:4],
 [https://code.djangoproject.com/ticket/21174#comment:6 21174#comment:6]
 and [https://docs.djangoproject.com/en/3.1/releases/1.7/#remove-and-clear-
 methods-of-related-managers Django 1.7 release notes]).

 I think we can add a note about this behavior of `clear()` and `remove()`
 to the [https://docs.djangoproject.com/en/3.1/ref/contrib/contenttypes
 /#reverse-generic-relations Reverse generic relations docs].

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32045#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.241108eb3a24a7d4f783cc040b282ee5%40djangoproject.com.

Reply via email to