#26993 closed Cleanup/optimization (fixed)
Increase the length of the User model's last_name field to 150 characters
Reported by: | Malcolm Box | Owned by: | Thom Wiggers |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | django@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Large parts of the world have names that can easily exceed the current 30 char limit - see discussion on Django-dev here: https://groups.google.com/forum/#!topic/django-developers/h98-oEi7z7g
Conclusion from discussion that extending the last_name field to somewhere between 60 and 255 would be reasonable.
Change History (11)
comment:1 by , 8 years ago
Easy pickings: | unset |
---|---|
Triage Stage: | Unreviewed → Someday/Maybe |
Type: | Bug → Cleanup/optimization |
comment:2 by , 8 years ago
Summary: | Increase the length of the User model's last_name field to allow more of the world to use it → Increase the length of the User model's last_name field to 100 characters |
---|---|
Triage Stage: | Someday/Maybe → Accepted |
Consensus on the mailing list suggests that 100 characters is sufficient.
comment:3 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 8 years ago
This should include docs and a database migration as in 15ef1dd478c5b6f005e5f782b7619f718ed55e84. Also, the discussion continues about 100 vs. 150 characters.
comment:5 by , 8 years ago
I rushed a little bit. I can see that. My mistake.
I was going to ask about the docs, whether to reference new commit to this one, or make it in the same one.
Will keep an eye on the discussion and update docs together with db migrations (if nescessary new models.py
file)once the discussion reaches the consensus.
comment:6 by , 8 years ago
Cc: | added |
---|---|
Has patch: | set |
Owner: | changed from | to
This came up in one of the applications I maintain and I thought I'd take a stab at fixing it.
comment:7 by , 8 years ago
Patch needs improvement: | set |
---|
comment:8 by , 8 years ago
Patch needs improvement: | unset |
---|---|
Summary: | Increase the length of the User model's last_name field to 100 characters → Increase the length of the User model's last_name field to 150 characters |
I have incorporated Tim's feedback. Details are available on the PR. Tim also suggested going for 150 chars, that's fine by me (edited title accordingly).
I'm unsetting 'Patch needs improvement' as I think that should make it show up for review again in Trac.
comment:9 by , 8 years ago
As an aside: maybe it is a good idea to make this same change for first names. There's probably going to be someone who breaks the current limit, either with or without including middle names.
E.g. there's some guy named "James <all james bond films> Bond"* according to some clickbait site.
Maybe this is more something for another mailing list discussion to reach some concensus though: in that case it's probably more something for a new issue.
*I got hit by the spam filter.
comment:11 by , 5 years ago
As an aside: maybe it is a good idea to make this same change for first names.
@Thom Wiggers
I maintain an open source project that uses Django, and we've had users asking for exactly that - they have international users with longer names in their LDAP systems, and the 30 character limit isn't good enough.
As such, I've filed a new ticket and opened a PR for anybody who's interested:
https://code.djangoproject.com/ticket/26993
https://github.com/django/django/pull/12581
Bumping to Someday/Maybe until there's a consensus about what length to use (hopefully that discussion won't go much longer).