#8274 closed (fixed)
Auth views should allow form customization
Reported by: | Julien Phalip | Owned by: | Julien Phalip |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
Severity: | Keywords: | ||
Cc: | philipe.rp@…, Dave Naffziger, bthomas@…, Freark van der Bos, steph, graham@…, michel@…, ben@…, MonteDavidoff, bas@… | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It is possible to make your own authentication backend. However, if you want to authenticate with usernames longer than 30 characters (e.g. emails) you cannot rely on the login view, since it's bound to use the AuthenticationForm, which itself only allows 30 characters usernames. You could easily find a way around if only the form was customizable.
Curiously, some views already allow form customization -- password_reset_confirm
and password_reset
-- but the others don't -- login
and password_change
--. The attached patch fixes the latter.
Attachments (2)
Change History (19)
Changed 15 years ago by
Attachment: | 8274.auth_forms.diff added |
---|
comment:1 Changed 15 years ago by
milestone: | 1.0 → 1.0 maybe |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 Changed 15 years ago by
comment:3 Changed 15 years ago by
milestone: | 1.0 maybe → post-1.0 |
---|
comment:4 Changed 15 years ago by
Owner: | changed from nobody to Julien Phalip |
---|---|
Status: | new → assigned |
#9168 was closed as dupe but contains a good addition to the docs for custom auth backends.
Changed 15 years ago by
Attachment: | authentication_form.diff added |
---|
comment:5 Changed 15 years ago by
Triage Stage: | Accepted → Ready for checkin |
---|
Ok, here's a patch with both changes and docs.
It also makes the password_change_form
use keyword arguments for niceness (and patch is a bit bigger because my editor strips trailing whitespace).
comment:6 Changed 15 years ago by
Cc: | Dave Naffziger added |
---|
comment:7 Changed 15 years ago by
Cc: | bthomas@… added |
---|
comment:8 Changed 15 years ago by
Cc: | Freark van der Bos added |
---|
comment:10 Changed 15 years ago by
Cc: | steph added |
---|
comment:11 Changed 15 years ago by
Cc: | graham@… added |
---|
comment:12 Changed 15 years ago by
Cc: | philipe.rp@… added |
---|
comment:13 Changed 14 years ago by
Cc: | michel@… added |
---|
comment:14 Changed 14 years ago by
Cc: | ben@… added |
---|
Any plans on adopting this? Does this need to be associated with a milestone again to get checked in?
comment:15 Changed 14 years ago by
Cc: | MonteDavidoff added |
---|
comment:16 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Implemented in r11618
comment:17 Changed 13 years ago by
Cc: | bas@… added |
---|
Just a note: the same request has been checked in for password reset views, see #6905.