mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
[soc2009/multidb] Cleaned up documentation for now stale using argument. Patch from Russell Keith-Magee.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@11946 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
c770ae0e8b
commit
cac9b38b1a
@ -183,16 +183,12 @@ The ``ContentTypeManager``
|
||||
probably won't ever need to call this method yourself; Django will call
|
||||
it automatically when it's needed.
|
||||
|
||||
.. method:: models.ContentTypeManager.get_for_model(model, using=DEFAULT_DB_ALIAS)
|
||||
.. method:: models.ContentTypeManager.get_for_model(model)
|
||||
|
||||
Takes either a model class or an instance of a model, and returns the
|
||||
:class:`~django.contrib.contenttypes.models.ContentType` instance
|
||||
representing that model.
|
||||
|
||||
By default, this will find the content type on the default database.
|
||||
You can load an instance from a different database by providing
|
||||
a ``using`` argument.
|
||||
|
||||
The :meth:`~models.ContentTypeManager.get_for_model()` method is especially useful when you know you
|
||||
need to work with a :class:`ContentType <django.contrib.contenttypes.models.ContentType>` but don't want to go to the
|
||||
trouble of obtaining the model's metadata to perform a manual lookup::
|
||||
|
Loading…
x
Reference in New Issue
Block a user