Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions django/db/models/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@
resolve_callables,
)
from django.utils import timezone
from django.utils.deprecation import RemovedInDjango70Warning, RemovedInDjango71Warning
from django.utils.deprecation import (
RemovedInDjango70Warning,
RemovedInDjango71Warning,
warn_about_external_use,
)
from django.utils.functional import cached_property
from django.utils.warnings import django_file_prefixes

Expand Down Expand Up @@ -1795,11 +1799,11 @@ def select_related(self, *fields):
else:
# RemovedInDjango70Warning: when the deprecation ends, raise a
# TypeError instead.
warnings.warn(
warn_about_external_use(
"Calling select_related() with no arguments is deprecated. "
"Specify the fields to fetch instead.",
category=RemovedInDjango70Warning,
skip_file_prefixes=django_file_prefixes(),
skip_name_prefixes=("django.db.models",),
)
obj.query.select_related = True
return obj
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/django-admin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Example usage:

.. console::

django-admin compilemessages --ignore=cache --ignore=outdated/*/locale
django-admin compilemessages --ignore=node_modules --ignore=outdated/*/locale

``createcachetable``
--------------------
Expand Down
Loading