Opened 8 years ago

Closed 7 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: UI/UX:


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@…> 8 years ago.
django.contrib.auth.forms patch
6850.diff (1.9 KB) - added by programmerq 8 years ago.

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by Bela Hausmann <post@…>

django.contrib.auth.forms patch

comment:1 Changed 8 years ago by programmerq

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

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.

Changed 8 years ago by programmerq

comment:2 Changed 8 years ago by programmerq

  • Patch needs improvement unset
  • Triage Stage changed from Accepted to Ready for checkin

comment:3 Changed 8 years ago by brosner

  • Triage Stage changed from Ready for checkin to Accepted

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 Changed 8 years ago by programmerq

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 Changed 7 years ago by thejaswi_puthraya

  • Resolution set to invalid
  • Status changed from new to closed

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

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