diff options
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/contrib/contenttypes.txt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/ref/contrib/contenttypes.txt b/docs/ref/contrib/contenttypes.txt index 914e06115b..fc685c8cd6 100644 --- a/docs/ref/contrib/contenttypes.txt +++ b/docs/ref/contrib/contenttypes.txt @@ -193,6 +193,13 @@ The ``ContentTypeManager`` :class:`~django.contrib.contenttypes.models.ContentType` instance representing that model. + .. method:: get_for_models(*models) + + Takes a variadic number of model classes, and returns a dictionary + mapping the model classes to the + :class:`~django.contrib.contenttypes.models.ContentType` instances + representing them. + .. method:: get_by_natural_key(app_label, model) Returns the :class:`~django.contrib.contenttypes.models.ContentType` @@ -319,8 +326,8 @@ creating a ``TaggedItem``:: Due to the way :class:`~django.contrib.contenttypes.generic.GenericForeignKey` is implemented, you cannot use such fields directly with filters (``filter()`` -and ``exclude()``, for example) via the database API. Because a -:class:`~django.contrib.contenttypes.generic.GenericForeignKey` isn't a +and ``exclude()``, for example) via the database API. Because a +:class:`~django.contrib.contenttypes.generic.GenericForeignKey` isn't a normal field objects, these examples will *not* work:: # This will fail |
