summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/contenttypes.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/ref/contrib/contenttypes.txt b/docs/ref/contrib/contenttypes.txt
index 0226435159..e98da6e429 100644
--- a/docs/ref/contrib/contenttypes.txt
+++ b/docs/ref/contrib/contenttypes.txt
@@ -187,6 +187,14 @@ The ``ContentTypeManager``
probably won't ever need to call this method yourself; Django will call
it automatically when it's needed.
+ .. method:: get_for_id(id)
+
+ 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)``
+
.. method:: get_for_model(model[, for_concrete_model=True])
Takes either a model class or an instance of a model, and returns the