summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
Diffstat (limited to 'django')
-rw-r--r--django/contrib/contenttypes/fields.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/contrib/contenttypes/fields.py b/django/contrib/contenttypes/fields.py
index 3c3b4d0039..5620d735fc 100644
--- a/django/contrib/contenttypes/fields.py
+++ b/django/contrib/contenttypes/fields.py
@@ -457,6 +457,9 @@ def create_generic_related_manager(superclass):
)
do_not_call_in_templates = True
+ def __str__(self):
+ return repr(self)
+
def get_queryset(self):
try:
return self.instance._prefetched_objects_cache[self.prefetch_cache_name]