#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 )
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 , 3 weeks ago
Description: | modified (diff) |
---|
comment:2 by , 3 weeks ago
comment:3 by , 3 weeks 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.
comment:4 by , 3 weeks ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:5 by , 3 weeks ago
Owner: | set to |
---|---|
Status: | new → assigned |
Self-assigning to start working on this
comment:7 by , 2 weeks ago
Patch needs improvement: | set |
---|
comment:8 by , 4 days ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
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.