#36972: Provide keyboard feedback in createsuperuser and changepassword commands
------------------------------+--------------------------------------
     Reporter:  Ketan Sahu    |                    Owner:  Ketan Sahu
         Type:  New feature   |                   Status:  assigned
    Component:  contrib.auth  |                  Version:  6.0
     Severity:  Normal        |               Resolution:
     Keywords:                |             Triage Stage:  Accepted
    Has patch:  0             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  0             |                    UI/UX:  0
------------------------------+--------------------------------------
Changes (by Jacob Walls):

 * cc: Thibaud Colas (added)
 * owner:  (none) => Ketan Sahu
 * stage:  Unreviewed => Accepted
 * status:  new => assigned
 * summary:  Improve password prompt wording in createsuperuser management
     command =>
     Provide keyboard feedback in createsuperuser and changepassword
     commands
 * type:  Cleanup/optimization => New feature


Old description:

> 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!

New description:

 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!

--
Comment:

 Accepting based on positive reception on the
 [https://forum.djangoproject.com/t/better-show-password-input-in-
 management-commands 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 `createpassword` at the same time as mentioned on forum.

 Thanks for offering a PR.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36972#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019cc0198149-444bb56d-05a7-4198-b716-da3c74340356-000000%40eu-central-1.amazonses.com.

Reply via email to