diff options
| author | Tim Graham <timograham@gmail.com> | 2015-10-02 10:46:29 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-09-06 09:48:58 -0400 |
| commit | 6a2af01452966d10155b720f4f5e7b09c7e3e419 (patch) | |
| tree | 1da78e35ed3e80f363b0798b257dcc46a5f4d980 /docs | |
| parent | 4c943365107e40571748196d9d1c11d3f0e3e2af (diff) | |
Fixed #24865 -- Added remove_stale_contenttypes management command.
Thanks Simon Charette for the review.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/django-admin.txt | 22 | ||||
| -rw-r--r-- | docs/releases/1.11.txt | 12 |
2 files changed, 31 insertions, 3 deletions
diff --git a/docs/ref/django-admin.txt b/docs/ref/django-admin.txt index 3421478f33..74f105be74 100644 --- a/docs/ref/django-admin.txt +++ b/docs/ref/django-admin.txt @@ -1456,6 +1456,28 @@ it could be useful if you have a ``ForeignKey`` in allow creating an instance instead of entering the primary key of an existing instance. +``django.contrib.contenttypes`` +------------------------------- + +``remove_stale_contenttypes`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. django-admin:: remove_stale_contenttypes + +.. versionadded:: 1.11 + +This command is only available if Django's :doc:`contenttypes app +</ref/contrib/contenttypes>` (:mod:`django.contrib.contenttypes`) is installed. + +Deletes stale content types (from deleted models) in your database. Any objects +that depend on the deleted content types will also be deleted. A list of +deleted objects will be displayed before you confirm it's okay to proceed with +the deletion. + +.. django-admin-option:: --database DATABASE + +Specifies the database to use. Defaults to ``default``. + ``django.contrib.gis`` ---------------------- diff --git a/docs/releases/1.11.txt b/docs/releases/1.11.txt index bb8c851f72..46bc7f1529 100644 --- a/docs/releases/1.11.txt +++ b/docs/releases/1.11.txt @@ -104,9 +104,11 @@ Minor features :mod:`django.contrib.contenttypes` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -* When stale content types are detected after the ``migrate`` command, there's - now a list of related objects such as ``auth.Permission``\s that will also be - deleted. Previously, only the content types were listed. +* When stale content types are detected in the + :djadmin:`remove_stale_contenttypes` command, there's now a list of related + objects such as ``auth.Permission``\s that will also be deleted. Previously, + only the content types were listed (and this prompt was after ``migrate`` + rather than in a separate command). :mod:`django.contrib.gis` ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -477,6 +479,10 @@ Miscellaneous be backwards-incompatible if you have some :ref:`template tags that aren't thread safe <template_tag_thread_safety>`. +* The prompt for stale content type deletion no longer occurs after running the + ``migrate`` command. Use the new :djadmin:`remove_stale_contenttypes` command + instead. + .. _deprecated-features-1.11: Features deprecated in 1.11 |
