1
0
mirror of https://github.com/django/django.git synced 2025-03-31 11:37:06 +00:00

Fixed #27587 -- Removing redundant str call

This commit is contained in:
Josiah White 2022-10-22 20:11:42 -07:00
parent 59ce6aa4a9
commit 336c409057
2 changed files with 2 additions and 2 deletions

View File

@ -478,7 +478,7 @@ Save these changes and start a new Python interactive shell by running
<QuerySet [<Question: What's up?>]>
# Print the SQL used to query the database
>>> from pprint import pprint
>>> pprint(str(q.query))
>>> pprint(q.query)
('SELECT "polls_question"."id", "polls_question"."question_text", '
'"polls_question"."pub_date" FROM "polls_question"')

View File

@ -344,7 +344,7 @@ When debugging a query, it may be useful to see the SQL generated by a
queryset. You may do this by converting the ``query`` attribute to a string.
>>> q = Entry.objects.all()
>>> str(q.query)
>>> print(q.query)
This prints the SQL that is used to query the database. From there, you may
look for unexpected clauses, etc. Note that this SQL may require modification