#36703: Undocumented change of SetPasswordForm in django 5.1 release notes
-------------------------------------+-------------------------------------
Reporter: Laurent Bergeron | Owner: (none)
Type: Bug | Status: closed
Component: contrib.auth | Version: 5.1
Severity: Normal | Resolution: invalid
Keywords: Authentication, | Triage Stage:
Forms | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Natalia Bidart):
* component: Documentation => contrib.auth
* easy: 1 => 0
* needs_docs: 1 => 0
* resolution: => invalid
* status: new => closed
* type: Uncategorized => Bug
Comment:
Replying to [comment:3 Laurent Bergeron]:
> Replying to [comment:2 ontowhee]:
> > Hello! It looks like the changes were from #34429, and the release
note you linked mentions `The new AdminUserCreationForm and the existing
AdminPasswordChangeForm now support disabling password-based
authentication by setting an unusable password on form save.`
>
> Yeah that seems to be it.
Hello Laurent! Thank you for taking the time to create the report. And
thank you Lilian for the triage.
> Now that super().clean() is executed before my error messages
replacement code, the latter works as expected. To be clear I didn't open
this issue to seek for help on how to solve this issue. I wanted to make
sure this change was detailed in the release notes.
The release notes don't (and can't) include every behavioral detail of
internal changes. In this case, the documented pattern is to call
`super()` first when overriding `clean()`, as described here:
https://docs.djangoproject.com/en/5.2/ref/forms/validation/#cleaning-and-
validating-fields-that-depend-on-each-other. Since the current behavior
aligns with the docs, I think there's nothing to change here, so I'm
closing this accordingly.
--
Ticket URL: <https://code.djangoproject.com/ticket/36703#comment:4>
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/0107019a49f41f11-2951a50e-4531-40a0-8b28-985077cc2b41-000000%40eu-central-1.amazonses.com.