A while ago the `forms.Field` base class gained the
[https://docs.djangoproject.com/en/stable/ref/forms/fields/#disabled
disabled] argument to:
> [disable] a form field using the disabled HTML attribute so that it
won’t be editable by users. Even if a user tampers with the field’s value
submitted to the server, it will be ignored in favor of the value from the
form’s initial data.
It seems to me that this property could be set to `True` be default on the
`ReadOnlyPasswordHashField` used to display the password hash. This way
the `clean_password` is no longer necessary and the potential pitfall when
using the `ReadOnlyPasswordHashField` without implementing
`clean_password` is removed.
--
Ticket URL: <https://code.djangoproject.com/ticket/32235>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
Comment:
Sounds good. Would you like to provide a patch?
--
Ticket URL: <https://code.djangoproject.com/ticket/32235#comment:1>
Comment (by Jaap Roes):
Replying to [comment:1 Mariusz Felisiak]:
> Sounds good. Would you like to provide a patch?
I don't have the time to do a proper patch (with doc changes and
additional tests). But I marked it as "Easy pickings" to entice others
that are trying to get into contribution to Django ;-)
--
Ticket URL: <https://code.djangoproject.com/ticket/32235#comment:2>
* owner: nobody => Timo Ludwig
* status: new => assigned
Comment:
I'd like to work on this as my first contribution to Django :)
I will provide a patch as soon as possible.
--
Ticket URL: <https://code.djangoproject.com/ticket/32235#comment:3>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/13741 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/32235#comment:4>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/32235#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"d8dfff2ab0edf7a1ca5255eccf45c447b2f9d57e" d8dfff2]:
{{{
#!CommitTicketReference repository=""
revision="d8dfff2ab0edf7a1ca5255eccf45c447b2f9d57e"
Fixed #32235 -- Made ReadOnlyPasswordHashField disabled by default.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/32235#comment:6>