Opened 4 weeks ago
Last modified 2 weeks ago
#36972 assigned New feature
Provide help text in password prompts for createsuperuser and changepassword commands
| Reported by: | Ketan Sahu | Owned by: | Ketan Sahu |
|---|---|---|---|
| Component: | contrib.auth | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Ketan Sahu, Thibaud Colas | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | yes |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
When running python manage.py createsuperuser, the password prompt currently shows:
Password:
Nothing is printed while typing (for security), but many beginners might think the terminal has frozen or the command isn’t working, since there’s no hint that the input is hidden.
Suggestion:
Update the password prompt in the createsuperuser management command to something clearer, like:
Password (input hidden):
or
Password: [input hidden]
Benefit:
- Makes clear that password input is working as intended, which is especially helpful for new users or beginners.
- Prevents confusion that the terminal/command has frozen.
- Brings Django’s CLI user experience in line with user-friendly conventions.
Contributor note:
I am ready to work on this improvement and would be happy to submit a pull request if this feature is approved or assigned to me.
Thank you for considering this suggestion!
Change History (7)
comment:1 by , 4 weeks ago
| Cc: | added |
|---|---|
| Description: | modified (diff) |
| Owner: | set to |
| Status: | new → assigned |
| Summary: | Improve password prompt wording in createsuperuser management command → Provide keyboard feedback in createsuperuser and changepassword commands |
| Triage Stage: | Unreviewed → Accepted |
| Type: | Cleanup/optimization → New feature |
comment:2 by , 4 weeks ago
Patch submitted via GitHub PR:
https://github.com/django/django/pull/20876#pullrequestreview-3912341691
comment:3 by , 4 weeks ago
| Has patch: | set |
|---|
comment:4 by , 4 weeks ago
| Needs documentation: | set |
|---|---|
| Needs tests: | set |
| Patch needs improvement: | set |
comment:5 by , 3 weeks ago
| Needs documentation: | unset |
|---|---|
| Needs tests: | unset |
| Patch needs improvement: | unset |
comment:6 by , 3 weeks ago
| Triage Stage: | Accepted → Ready for checkin |
|---|---|
| Version: | 6.0 → dev |
comment:7 by , 2 weeks ago
| Patch needs improvement: | set |
|---|---|
| Summary: | Provide keyboard feedback in createsuperuser and changepassword commands → Provide help text in password prompts for createsuperuser and changepassword commands |
| Triage Stage: | Ready for checkin → Accepted |
As Natalia helpfully pointed out on the forum, echo_char will break CTRL+U, so we're going to need to fall back to the next least objectionable option discussed on the forum, which was to just provide some help text.
Accepting based on positive reception on the forum.
I'd like to reframe this to simply provide keyboard feedback via the
echo_char="*"argument on Python 3.14+. I'll cross-post on the forum.We should address
changepasswordat the same time (that is, both commands callinggetpass()) as mentioned on forum.Thanks for offering a PR.