mirror of
https://github.com/django/django.git
synced 2024-12-25 02:26:12 +00:00
[5.0.x] Added missing import in docs/ref/contrib/contenttypes.txt.
Backport of 958e4cfe42
from main
This commit is contained in:
parent
9f8bf7aebe
commit
1e9f66e8e0
@ -607,6 +607,7 @@ with non-homogeneous set of results.
|
||||
|
||||
.. code-block:: pycon
|
||||
|
||||
>>> from django.contrib.contenttypes.prefetch import GenericPrefetch
|
||||
>>> bookmark = Bookmark.objects.create(url="https://www.djangoproject.com/")
|
||||
>>> animal = Animal.objects.create(name="lion", weight=100)
|
||||
>>> TaggedItem.objects.create(tag="great", content_object=bookmark)
|
||||
|
Loading…
Reference in New Issue
Block a user