summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2012-09-15 08:15:54 -0400
committerTim Graham <timograham@gmail.com>2012-09-15 08:15:54 -0400
commit93e6733e4cbbdad34f1f0f59303ae01f577e4e58 (patch)
tree4a4304cd7b7e5cbd8fecebbb678e6195bcaf4c48 /docs
parent22242c510f84c53803afe2907649c892cb1b3d9a (diff)
Fixed #18131 - Documented ContentTypeManager.get_for_id; thanks sir_sigurd for the report.
Diffstat (limited to 'docs')
-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