mirror of
https://github.com/django/django.git
synced 2025-03-13 10:50:55 +00:00
Added missing import in docs/ref/contrib/contenttypes.txt.
This commit is contained in:
parent
296b75a3c0
commit
958e4cfe42
@ -607,6 +607,7 @@ with non-homogeneous set of results.
|
|||||||
|
|
||||||
.. code-block:: pycon
|
.. code-block:: pycon
|
||||||
|
|
||||||
|
>>> from django.contrib.contenttypes.prefetch import GenericPrefetch
|
||||||
>>> bookmark = Bookmark.objects.create(url="https://www.djangoproject.com/")
|
>>> bookmark = Bookmark.objects.create(url="https://www.djangoproject.com/")
|
||||||
>>> animal = Animal.objects.create(name="lion", weight=100)
|
>>> animal = Animal.objects.create(name="lion", weight=100)
|
||||||
>>> TaggedItem.objects.create(tag="great", content_object=bookmark)
|
>>> TaggedItem.objects.create(tag="great", content_object=bookmark)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user