1
0
mirror of https://github.com/django/django.git synced 2025-03-31 19:46:42 +00:00

Fixed #27587 -- Removing pprint, showing more accurate console text.

This commit is contained in:
Josiah White 2022-10-22 20:13:18 -07:00
parent 336c409057
commit ab13ced50c

View File

@ -477,10 +477,9 @@ Save these changes and start a new Python interactive shell by running
>>> q >>> q
<QuerySet [<Question: What's up?>]> <QuerySet [<Question: What's up?>]>
# Print the SQL used to query the database # Print the SQL used to query the database
>>> from pprint import pprint >>> print(q.query)
>>> pprint(q.query) SELECT "polls_question"."id", "polls_question"."question_text",
('SELECT "polls_question"."id", "polls_question"."question_text", ' "polls_question"."pub_date" FROM "polls_question"
'"polls_question"."pub_date" FROM "polls_question"')
# Django provides a rich database lookup API that's entirely driven by # Django provides a rich database lookup API that's entirely driven by
# keyword arguments. # keyword arguments.