[Django] #26993: Increase the length of the User model's last_name field to allow more of the world to use it

16 views
Skip to first unread message

Django

unread,
Aug 2, 2016, 9:35:10 AM8/2/16
to django-...@googlegroups.com
#26993: Increase the length of the User model's last_name field to allow more of
the world to use it
------------------------------+--------------------
Reporter: mbox | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
------------------------------+--------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/26993>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 2, 2016, 9:53:10 AM8/2/16
to django-...@googlegroups.com
#26993: Increase the length of the User model's last_name field to allow more of
the world to use it
-------------------------------------+-------------------------------------
Reporter: mbox | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* easy: 1 => 0
* needs_docs: => 0
* type: Bug => Cleanup/optimization
* stage: Unreviewed => Someday/Maybe


Comment:

Bumping to Someday/Maybe until there's a consensus about what length to
use (hopefully that discussion won't go much longer).

--
Ticket URL: <https://code.djangoproject.com/ticket/26993#comment:1>

Django

unread,
Aug 10, 2016, 2:55:52 PM8/10/16
to django-...@googlegroups.com
#26993: Increase the length of the User model's last_name field to 100 characters
--------------------------------------+------------------------------------
Reporter: mbox | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.auth | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* stage: Someday/Maybe => Accepted


Comment:

Consensus on the mailing list suggests that 100 characters is sufficient.

--
Ticket URL: <https://code.djangoproject.com/ticket/26993#comment:2>

Django

unread,
Aug 12, 2016, 2:31:13 PM8/12/16
to django-...@googlegroups.com
#26993: Increase the length of the User model's last_name field to 100 characters
--------------------------------------+------------------------------------
Reporter: mbox | Owner: an0o0nym
Type: Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by an0o0nym):

* owner: nobody => an0o0nym
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/26993#comment:3>

Django

unread,
Aug 12, 2016, 2:58:29 PM8/12/16
to django-...@googlegroups.com
#26993: Increase the length of the User model's last_name field to 100 characters
--------------------------------------+------------------------------------
Reporter: mbox | Owner: an0o0nym
Type: Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by timgraham):

This should include docs and a database migration as in
15ef1dd478c5b6f005e5f782b7619f718ed55e84. Also, the discussion continues
about 100 vs. 150 characters.

--
Ticket URL: <https://code.djangoproject.com/ticket/26993#comment:4>

Django

unread,
Aug 12, 2016, 3:07:49 PM8/12/16
to django-...@googlegroups.com
#26993: Increase the length of the User model's last_name field to 100 characters
--------------------------------------+------------------------------------
Reporter: mbox | Owner: an0o0nym
Type: Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by an0o0nym):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/26993#comment:5>

Django

unread,
Jan 22, 2017, 10:14:34 AM1/22/17
to django-...@googlegroups.com
#26993: Increase the length of the User model's last_name field to 100 characters
-------------------------------------+-------------------------------------
Reporter: Malcolm Box | Owner: Thom
Type: | Wiggers
Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Thom Wiggers):

* cc: django@… (added)
* owner: Damian => Thom Wiggers
* has_patch: 0 => 1


Comment:

This came up in one of the applications I maintain and I thought I'd take
a stab at fixing it.

[https://github.com/django/django/pull/7923 A PR can be found here on
Github: PR7923]

--
Ticket URL: <https://code.djangoproject.com/ticket/26993#comment:6>

Django

unread,
Jan 27, 2017, 9:04:15 AM1/27/17
to django-...@googlegroups.com
#26993: Increase the length of the User model's last_name field to 100 characters
-------------------------------------+-------------------------------------
Reporter: Malcolm Box | Owner: Thom
Type: | Wiggers
Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/26993#comment:7>

Django

unread,
Jan 28, 2017, 6:41:34 AM1/28/17
to django-...@googlegroups.com
#26993: Increase the length of the User model's last_name field to 150 characters

-------------------------------------+-------------------------------------
Reporter: Malcolm Box | Owner: Thom
Type: | Wiggers
Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Thom Wiggers):

* needs_better_patch: 1 => 0


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/26993#comment:8>

Django

unread,
Jan 28, 2017, 6:49:48 AM1/28/17
to django-...@googlegroups.com
#26993: Increase the length of the User model's last_name field to 150 characters
-------------------------------------+-------------------------------------
Reporter: Malcolm Box | Owner: Thom
Type: | Wiggers
Cleanup/optimization | Status: assigned
Component: contrib.auth | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Thom Wiggers):

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 [http://mentalfloss.com/article/18271/names-too-long-name-tags-even-
comically-oversized-ones 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.

--
Ticket URL: <https://code.djangoproject.com/ticket/26993#comment:9>

Django

unread,
Jan 28, 2017, 9:45:10 AM1/28/17
to django-...@googlegroups.com
#26993: Increase the length of the User model's last_name field to 150 characters
-------------------------------------+-------------------------------------
Reporter: Malcolm Box | Owner: Thom
Type: | Wiggers
Cleanup/optimization | Status: closed
Component: contrib.auth | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"d5b573d872bbe0d5825efaee2d41cb3cdc75417b" d5b573d]:
{{{
#!CommitTicketReference repository=""
revision="d5b573d872bbe0d5825efaee2d41cb3cdc75417b"
Fixed #26993 -- Increased User.last_name max_length to 150 characters.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26993#comment:10>

Django

unread,
Mar 17, 2020, 7:47:35 AM3/17/20
to django-...@googlegroups.com
#26993: Increase the length of the User model's last_name field to 150 characters
-------------------------------------+-------------------------------------
Reporter: Malcolm Box | Owner: Thom
Type: | Wiggers
Cleanup/optimization | Status: closed
Component: contrib.auth | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Ryan Petrello):

> 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

--
Ticket URL: <https://code.djangoproject.com/ticket/26993#comment:11>

Reply all
Reply to author
Forward
0 new messages