Opened 16 years ago

Closed 15 years ago

#6850 closed (invalid)

contrib.auth.forms is inconsistent on form field labels and max_length

Reported by: Bela Hausmann <post@…> Owned by: nobody
Component: Contrib apps Version: newforms-admin
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Not all fields have appropriate labels, also max_length on passwords fields differs from form to form (I set it all to 30, like in the model definitions). Also the email field should have the same max_length like the model (which is none/default). See patch.

Attachments (2)

auth_forms.diff (2.9 KB ) - added by Bela Hausmann <post@…> 16 years ago.
django.contrib.auth.forms patch
6850.diff (1.9 KB ) - added by Jeff Anderson 16 years ago.

Download all attachments as: .zip

Change History (7)

by Bela Hausmann <post@…>, 16 years ago

Attachment: auth_forms.diff added

django.contrib.auth.forms patch

comment:1 by Jeff Anderson, 16 years ago

Patch needs improvement: set
Triage Stage: UnreviewedAccepted

All the fields have had labels added since this ticket was opened.

The inconsistency of the 'max_length' being set to 30 or 60 is still there.

Is there a reason that the lengths were set to 60?

I'm going to write up a patch that applies cleanly that changes all the values to 30.

by Jeff Anderson, 16 years ago

Attachment: 6850.diff added

comment:2 by Jeff Anderson, 16 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:3 by Brian Rosner, 16 years ago

Triage Stage: Ready for checkinAccepted

Someone correct me if I am wrong, but the values that are set for max_length on the forms in django.contrib.auth.forms are correctly mirrored from trunk. There may be a presentation issue, but surely it allowed 60 characters. This would limit them to 30.

comment:4 by Jeff Anderson, 16 years ago

It did mirror the way that the form was in trunk, yes. This ticket was opened because the form wasn't consistent with what the models specified. I am digging in and verifying this. According to the model definition, a username should only be 30 characters, a password 128, and an e-mail doesn't have an explicit limit defined in the model.

I don't think that my latest patch reflects those numbers exactly, but the form probably should reflect the model's limits.

comment:5 by Thejaswi Puthraya, 15 years ago

Resolution: invalid
Status: newclosed

Most of this seems to have already been fixed in the current trunk. I am closing this
ticket.

Note: See TracTickets for help on using tickets.
Back to Top