Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.4.x] Fixed #18131 - Documented ContentTypeManager.get_for_id; than…

…ks sir_sigurd for the report.

Backport of 93e6733 from master.
  • Loading branch information...
commit 421ce44e8bb7386d1f5826d0473a3e24f6075d35 1 parent 18d88a1
Tim Graham authored September 15, 2012

Showing 1 changed file with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. 8  docs/ref/contrib/contenttypes.txt
8  docs/ref/contrib/contenttypes.txt
@@ -187,6 +187,14 @@ The ``ContentTypeManager``
187 187
         probably won't ever need to call this method yourself; Django will call
188 188
         it automatically when it's needed.
189 189
 
  190
+    .. method:: get_for_id(id)
  191
+
  192
+        Lookup a :class:`~django.contrib.contenttypes.models.ContentType` by ID.
  193
+        Since this method uses the same shared cache as
  194
+        :meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_model`,
  195
+        it's preferred to use this method over the usual
  196
+        ``ContentType.objects.get(pk=id)``
  197
+
190 198
     .. method:: get_for_model(model)
191 199
 
192 200
         Takes either a model class or an instance of a model, and returns the

0 notes on commit 421ce44

Please sign in to comment.
Something went wrong with that request. Please try again.