#18682: Make the deletion of stale content types safer
--------------------------------------+------------------------------------
     Reporter:  aaugustin             |                    Owner:
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  contrib.contenttypes  |                  Version:  1.3
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by erikr):

 * status:  assigned => new
 * needs_better_patch:  1 => 0
 * owner:  erikr =>
 * needs_tests:  1 => 0
 * needs_docs:  1 => 0


Comment:

 I have submitted a new PR: https://github.com/django/django/pull/6869

 This PR uses the Collector to determine which objects would be deleted.
 This is the same collector that the admin uses to display which objects
 might be deleted, so it should be very thorough.

 I have also changed the wording away from "need to be deleted" as I've
 been unable to find a basis for that claim of necessity. This was
 introduced in the confirmation added in #12339, which built upon #5177 in
 which the original (without confirmation) delete of stale types was added.

 An example, as produced in the tests, now looks like this. Probably we can
 still improve the language:
 {{{
 Some content types in your database are stale and can be deleted.
 Any objects that depend on these content types will then also be deleted.
 The content types, and the dependent objects that would be deleted, are:

     - Content type for contenttypes_tests.Fake
     - 1 object of type contenttypes_tests.post:
         - post

 This list does not include data that might be in your database
 outside of Django's models.

 Are you sure you want to delete these content types?
 If you're unsure, answer 'no'.
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/18682#comment:13>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.08a6e3c3880b980e2855a56a65b0af7b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to