diff options
| author | David Smith <smithdc@gmail.com> | 2025-07-25 10:24:17 +0100 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2025-08-25 10:51:10 -0300 |
| commit | f81e6e3a53ee36e3f730a71aa55a5744982dd016 (patch) | |
| tree | 44a4fdd64e2d1489d80b1af8bd1ac3c7af3ad0dd /docs/ref/contrib/contenttypes.txt | |
| parent | 4286a23df64f6ce3b9b6ed097f4d1aac7d9e0de4 (diff) | |
Refs #36485 -- Rewrapped docs to 79 columns line length.
Lines in the docs files were manually adjusted to conform to the
79 columns limit per line (plus newline), improving readability and
consistency across the content.
Diffstat (limited to 'docs/ref/contrib/contenttypes.txt')
| -rw-r--r-- | docs/ref/contrib/contenttypes.txt | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/docs/ref/contrib/contenttypes.txt b/docs/ref/contrib/contenttypes.txt index f8232cec1d..2f0b45ff25 100644 --- a/docs/ref/contrib/contenttypes.txt +++ b/docs/ref/contrib/contenttypes.txt @@ -188,8 +188,8 @@ The ``ContentTypeManager`` .. method:: get_for_id(id) - Lookup a :class:`~django.contrib.contenttypes.models.ContentType` by ID. - Since this method uses the same shared cache as + Lookup a :class:`~django.contrib.contenttypes.models.ContentType` by + ID. Since this method uses the same shared cache as :meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_model`, it's preferred to use this method over the usual ``ContentType.objects.get(pk=id)`` @@ -338,10 +338,11 @@ model: .. admonition:: Serializing references to ``ContentType`` objects If you're serializing data (for example, when generating - :class:`~django.test.TransactionTestCase.fixtures`) from a model that implements - generic relations, you should probably be using a natural key to uniquely - identify related :class:`~django.contrib.contenttypes.models.ContentType` - objects. See :ref:`natural keys<topics-serialization-natural-keys>` and + :class:`~django.test.TransactionTestCase.fixtures`) from a model that + implements generic relations, you should probably be using a natural key to + uniquely identify related + :class:`~django.contrib.contenttypes.models.ContentType` objects. See + :ref:`natural keys<topics-serialization-natural-keys>` and :option:`dumpdata --natural-foreign` for more information. This will enable an API similar to the one used for a normal |
