mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
Fixed #18131 - Documented ContentTypeManager.get_for_id; thanks sir_sigurd for the report.
This commit is contained in:
parent
22242c510f
commit
93e6733e4c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user