Opened 10 months ago

Closed 9 months ago

Last modified 9 months ago

#36625 closed Cleanup/optimization (fixed)

Please mention quit() when instucting the user to "restart the shell" in tutorial 2

Reported by: Charles Severance Owned by: arsalan64
Component: Documentation Version: 5.2
Severity: Normal Keywords: tutorial
Cc: Charles Severance Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by Charles Severance)

This is pretty simple. In tutorial 2:

https://docs.djangoproject.com/en/5.2/intro/tutorial02/

It has the following statement:

Save these changes and start a new Python interactive shell by running python manage.py shell again:

It should be reworded to say:

Save these changes and start a new Python interactive shell by running python manage.py shell again.
If you are currently in the shell with a three-chevron prompt (>>>), you need to exit the current
shell using quit() and then run python manage.py shell again to reload the shell
with the new models.

Change History (11)

comment:1 by Charles Severance, 10 months ago

Description: modified (diff)

comment:2 by Charles Severance, 10 months ago

I already have patch at

https://github.com/csev/django/tree/ticket_36625

I did not submit a PR because I figured I probably had to submit a contribution agreement or something. Also this ticket could use some review methinks. Thanks in advance.

comment:3 by Adam Johnson, 10 months ago

Seems like a reasonable improvement.

Small bikeshed: I think exit() is more common.

It's also worth noting that from Python 3.13+ onwards, the parentheses are not required: https://docs.python.org/3/whatsnew/3.13.html#:~:text=Direct%20support%20for%20REPL%2Dspecific%20commands%20like%20help%2C%20exit%2C%20and%20quit%2C%20without%20the%20need%20to%20call%20them%20as%20functions . We may be able to leave a comment in the document so that when we drop Python 3.12 support we can update the tutorial to remove the parentheses.

Last edited 10 months ago by Adam Johnson (previous) (diff)

comment:4 by Adam Johnson, 10 months ago

Triage Stage: UnreviewedAccepted

comment:5 by arsalan64, 10 months ago

Owner: set to arsalan64
Status: newassigned

Self-assigning to start working on this

comment:7 by Jacob Walls, 10 months ago

Patch needs improvement: set

comment:8 by Jacob Walls, 9 months ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:9 by Jacob Walls <jacobtylerwalls@…>, 9 months ago

Resolution: fixed
Status: assignedclosed

In 92d0c21e:

Fixed #36625 -- Mentioned exit() in tutorial's instruction to restart the shell.

comment:10 by Jacob Walls <jacobtylerwalls@…>, 9 months ago

In 7c2ff0f:

[6.0.x] Fixed #36625 -- Mentioned exit() in tutorial's instruction to restart the shell.

Backport of 92d0c21e69901cb7b749040670d3e6611353e1fa from main.

comment:11 by Jacob Walls <jacobtylerwalls@…>, 9 months ago

In 94cbd67d:

[5.2.x] Fixed #36625 -- Mentioned exit() in tutorial's instruction to restart the shell.

Backport of 92d0c21e69901cb7b749040670d3e6611353e1fa from main.

Note: See TracTickets for help on using tickets.
Back to Top