Extend support for long surnames in Django Auth

classic Classic list List threaded Threaded
42 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Extend support for long surnames in Django Auth

Raony Guimaraes Corrêa Do Carmo Lisboa Cardenas
Hello everyone,

For a long time I was having problems to login to djangopackages.com using my github account (pydanny/djangopackages#338). After investigating I discovered the problem was because my surname is longer than 30 characters. I don't know why both first_name and last_name fields have the same size limit of 30 characters in Django. That doesn't sound very reasonable.

I'm sure there are other people on the same situation and this already happened with me trying to login in other django websites.


selection_086


Tim Graham suggested I should first ask on this maillist (https://github.com/django/django/pull/6988#issuecomment-235945422) to see if there is consensus to make the change.

I would like to ask your opinion about an increase from 30 to 60 characters on last_name field so that my login and others won't break again in the future. I can create a Trac ticket if the response is positive.

Kind Regards,


--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/56bc25d9-372e-4985-b601-3cce9664160c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

Erik Cederstrand
Hello Raony,

I'm sure I'm not aware of all the implications of changing the field length, but the first question should be "how long is long enough"? In answering this question, this Quora question comes to mind: https://www.quora.com/Why-are-South-Indian-names-often-long

Kind regards,
Erik
a.k.a. Bommiraju Sitaramanjaneyulu Rajasekhara Srinivasulu Laxminarayana Siva Venkata Sai :-)

> Den 29. jul. 2016 kl. 09.18 skrev Raony Guimaraes Corrêa Do Carmo Lisboa Cardenas <[hidden email]>:
>
> Hello everyone,
>
> For a long time I was having problems to login to djangopackages.com using my github account (pydanny/djangopackages#338). After investigating I discovered the problem was because my surname is longer than 30 characters. I don't know why both first_name and last_name fields have the same size limit of 30 characters in Django. That doesn't sound very reasonable.
>
> I'm sure there are other people on the same situation and this already happened with me trying to login in other django websites.
>
>
>
>
>
>
>
> Tim Graham suggested I should first ask on this maillist (https://github.com/django/django/pull/6988#issuecomment-235945422) to see if there is consensus to make the change.
>
> I would like to ask your opinion about an increase from 30 to 60 characters on last_name field so that my login and others won't break again in the future. I can create a Trac ticket if the response is positive.
>
> Kind Regards,
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/56bc25d9-372e-4985-b601-3cce9664160c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/7FA7D68D-F718-404C-9F89-B4E1C3C8A6ED%40cederstrand.dk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

Aymeric Augustin
In reply to this post by Raony Guimaraes Corrêa Do Carmo Lisboa Cardenas
Hello,

Indeed, Django’s default limit on last name length doesn’t work well for Brazilians (at least).

Actually having a `first_name` and `last_name` field doesn’t work well in various cultures, including the US when you want a middle initial. Custom user models are the general answer to that question.

In this particular case, the drawbacks of increasing the `max_length` of `first_name` and `last_name` to something like 50 seem limited now that we have the migrations framework. Making that change will automatically avoid the issue for many people — perhaps at the cost of introducing UI issues when the name is displayed in the header, but that’s arguably a lesser evil.

So I’m +0 on making that change.

--
Aymeric.

> On 29 Jul 2016, at 09:18, Raony Guimaraes Corrêa Do Carmo Lisboa Cardenas <[hidden email]> wrote:
>
> Hello everyone,
>
> For a long time I was having problems to login to djangopackages.com using my github account (pydanny/djangopackages#338). After investigating I discovered the problem was because my surname is longer than 30 characters. I don't know why both first_name and last_name fields have the same size limit of 30 characters in Django. That doesn't sound very reasonable.
>
> I'm sure there are other people on the same situation and this already happened with me trying to login in other django websites.
>
> Tim Graham suggested I should first ask on this maillist (https://github.com/django/django/pull/6988#issuecomment-235945422) to see if there is consensus to make the change.
>
> I would like to ask your opinion about an increase from 30 to 60 characters on last_name field so that my login and others won't break again in the future. I can create a Trac ticket if the response is positive.
>
> Kind Regards,
>
>
>
> --
> You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/56bc25d9-372e-4985-b601-3cce9664160c%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/4A15ED67-802B-4A3A-85DA-265A5A5ADEF1%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

ludovic coues
The W3C have some recommandation on the question.

https://www.w3.org/International/questions/qa-personal-names

2016-07-29 17:47 GMT+02:00 Aymeric Augustin
<[hidden email]>:

> Hello,
>
> Indeed, Django’s default limit on last name length doesn’t work well for Brazilians (at least).
>
> Actually having a `first_name` and `last_name` field doesn’t work well in various cultures, including the US when you want a middle initial. Custom user models are the general answer to that question.
>
> In this particular case, the drawbacks of increasing the `max_length` of `first_name` and `last_name` to something like 50 seem limited now that we have the migrations framework. Making that change will automatically avoid the issue for many people — perhaps at the cost of introducing UI issues when the name is displayed in the header, but that’s arguably a lesser evil.
>
> So I’m +0 on making that change.
>
> --
> Aymeric.
>
>> On 29 Jul 2016, at 09:18, Raony Guimaraes Corrêa Do Carmo Lisboa Cardenas <[hidden email]> wrote:
>>
>> Hello everyone,
>>
>> For a long time I was having problems to login to djangopackages.com using my github account (pydanny/djangopackages#338). After investigating I discovered the problem was because my surname is longer than 30 characters. I don't know why both first_name and last_name fields have the same size limit of 30 characters in Django. That doesn't sound very reasonable.
>>
>> I'm sure there are other people on the same situation and this already happened with me trying to login in other django websites.
>>
>> Tim Graham suggested I should first ask on this maillist (https://github.com/django/django/pull/6988#issuecomment-235945422) to see if there is consensus to make the change.
>>
>> I would like to ask your opinion about an increase from 30 to 60 characters on last_name field so that my login and others won't break again in the future. I can create a Trac ticket if the response is positive.
>>
>> Kind Regards,
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> To post to this group, send email to [hidden email].
>> Visit this group at https://groups.google.com/group/django-developers.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/56bc25d9-372e-4985-b601-3cce9664160c%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/4A15ED67-802B-4A3A-85DA-265A5A5ADEF1%40polytechnique.org.
> For more options, visit https://groups.google.com/d/optout.



--

Cordialement, Coues Ludovic
+336 148 743 42

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAEuG%2BTZXuGBr4_eU5pHBUONX8k5Z-z13YApJOxH%3D4iWbPutArA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

Aymeric Augustin
Hello,

I usually build my projects upon these recommendations, but the UX is awkward and the end result tends to be short_name = first_name and full_name = first_name + space + last_name.

We could discuss the usefulness of providing an alternate user model that has short_name + full_name instead of first_name + last_name but in my opinion that’s another discussion.

Best regards,

--
Aymeric.

> On 29 Jul 2016, at 17:55, ludovic coues <[hidden email]> wrote:
>
> The W3C have some recommandation on the question.
>
> https://www.w3.org/International/questions/qa-personal-names
>
> 2016-07-29 17:47 GMT+02:00 Aymeric Augustin
> <[hidden email]>:
>> Hello,
>>
>> Indeed, Django’s default limit on last name length doesn’t work well for Brazilians (at least).
>>
>> Actually having a `first_name` and `last_name` field doesn’t work well in various cultures, including the US when you want a middle initial. Custom user models are the general answer to that question.
>>
>> In this particular case, the drawbacks of increasing the `max_length` of `first_name` and `last_name` to something like 50 seem limited now that we have the migrations framework. Making that change will automatically avoid the issue for many people — perhaps at the cost of introducing UI issues when the name is displayed in the header, but that’s arguably a lesser evil.
>>
>> So I’m +0 on making that change.
>>
>> --
>> Aymeric.
>>
>>> On 29 Jul 2016, at 09:18, Raony Guimaraes Corrêa Do Carmo Lisboa Cardenas <[hidden email]> wrote:
>>>
>>> Hello everyone,
>>>
>>> For a long time I was having problems to login to djangopackages.com using my github account (pydanny/djangopackages#338). After investigating I discovered the problem was because my surname is longer than 30 characters. I don't know why both first_name and last_name fields have the same size limit of 30 characters in Django. That doesn't sound very reasonable.
>>>
>>> I'm sure there are other people on the same situation and this already happened with me trying to login in other django websites.
>>>
>>> Tim Graham suggested I should first ask on this maillist (https://github.com/django/django/pull/6988#issuecomment-235945422) to see if there is consensus to make the change.
>>>
>>> I would like to ask your opinion about an increase from 30 to 60 characters on last_name field so that my login and others won't break again in the future. I can create a Trac ticket if the response is positive.
>>>
>>> Kind Regards,
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>>> To post to this group, send email to [hidden email].
>>> Visit this group at https://groups.google.com/group/django-developers.
>>> To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/56bc25d9-372e-4985-b601-3cce9664160c%40googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
>> To post to this group, send email to [hidden email].
>> Visit this group at https://groups.google.com/group/django-developers.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/4A15ED67-802B-4A3A-85DA-265A5A5ADEF1%40polytechnique.org.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
>
> Cordialement, Coues Ludovic
> +336 148 743 42
>
> --
> You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> To post to this group, send email to [hidden email].
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAEuG%2BTZXuGBr4_eU5pHBUONX8k5Z-z13YApJOxH%3D4iWbPutArA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/F08996B9-43E8-44A1-BD4A-AD8D1C91EBE6%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

James Pic

Indeed first and last name dont make sense en various culture. In the Memopol project for exampe where wé have a table of European Parliament representative we have all sorts of names including (The Earl Of) name suffix which is part of the reasons our first / last name system was completely checkmated.

Nowadays I just go for a single and long name field and I would like to suggest that django.contrib.auth takes this path too because the first name and last name system isn't international and django is for building websites on internet which is meant to be a communication tool connecting Humans of the world, no matter if they have a first and last name or not.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CALC3KafvSRCm8O8%3Dgnps9ogCoxc9Fz4%3DxdhXCM_MPDN9fv0Wmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

Josh Smeaton
> Nowadays I just go for a single and long name field and I would like to suggest that django.contrib.auth takes this path too because the first name and last name system isn't international and django is for building websites on internet which is meant to be a communication tool connecting Humans of the world, no matter if they have a first and last name or not.

I think having a single name field is reasonable for the vast majority of cases, but it fails where projects really do need to identify two names for things like sorting or categorising. I'd be willing to argue that if you did need to differentiate between parts of a full name then you could customise your User model to account for that. The issue is backward compatibility. We can't just use migrations to remove the last name field because that would break working code and potentially delete data. It'd break a lot more than simply increasing the size of existing labels.

I'm +0 on increasing the length of first name and last name. 

Separately but related - I'd be interested in a discussion around what Django could do to encourage new projects to always customise their user model. Something like having the startproject command include a models file containing a user model ready to be customised, and the setting AUTH_USER_MODEL correctly pointing to it (perhaps with switches to switch between different user models?). So many people run into issues by not customising their user model right at the beginning of their project, and we get into positions where users are unable to properly fix problems they have with the user model and ask for modifications to the default user model like we're seeing here. 

Regards,

Josh

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/15f6dbeb-65c3-4a28-b084-80fffb8d81b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

Raony Guimaraes Corrêa Do Carmo Lisboa Cardenas
In reply to this post by Raony Guimaraes Corrêa Do Carmo Lisboa Cardenas
Hello all, here are my thoughts after reading the discussion.

@Erik You won on having the biggest name! Regarding your question about "how long is long enough", after checking other web frameworks such as rails (http://stackoverflow.com/questions/3354330/difference-between-string-and-text-in-rails), I believe the most sensible proposal would be to increase from 30 to 255, which is the maximum value permitted for a varchar without changing any field in User model.

@Aymeric Agree with you that now with the migrations framework this would not be a big issue. Regarding the UI, I argue that this is something we already have to deal with, for example, if someone uses all 60 characters for first_name and last_name (Ex. "Bommiraju Sitaramanjaneyulu Rajasekhara Srinivasulu L S V Sai")  this will probably already break the UI in most cases. We can always use {{ last_name|truncatechars:30 }} to fix the UI. I mostly believe we should delegate this to the developers of each app and not to the users (Ex. that have big surnames).

@Ludovic, is_null and Josh Thank you for the link and suggestions. I agree that "Full name" seems to be the most reasonable choice here, but I don't want break backwards compatibility, or at least not on this proposal. :)

So I'm suggesting a change from 30 to 255 characters on last_name field, which is the maximum possible without breaking backwards compatibility. Maybe on Django 3 we can propose a change to "Full name" field ?

Kind Regards.

On Friday, July 29, 2016 at 1:15:43 PM UTC+2, Raony Guimaraes Corrêa Do Carmo Lisboa Cardenas wrote:
Hello everyone,

For a long time I was having problems to login to <a href="http://djangopackages.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdjangopackages.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFsZZ_S1kr0OzOKIOicgYOoa1dmWQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdjangopackages.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFsZZ_S1kr0OzOKIOicgYOoa1dmWQ&#39;;return true;">djangopackages.com using my github account (<a title="Github Login Broken" href="https://github.com/pydanny/djangopackages/issues/338" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fpydanny%2Fdjangopackages%2Fissues%2F338\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEXfwZ2eA7pRYdxD7yWtyjzX7aGwg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fpydanny%2Fdjangopackages%2Fissues%2F338\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEXfwZ2eA7pRYdxD7yWtyjzX7aGwg&#39;;return true;">pydanny/djangopackages#338). After investigating I discovered the problem was because my surname is longer than 30 characters. I don't know why both first_name and last_name fields have the same size limit of 30 characters in Django. That doesn't sound very reasonable.

I'm sure there are other people on the same situation and this already happened with me trying to login in other django websites.


<a href="https://cloud.githubusercontent.com/assets/124987/17208678/f7a40f40-54b9-11e6-8978-7240782707c7.png" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcloud.githubusercontent.com%2Fassets%2F124987%2F17208678%2Ff7a40f40-54b9-11e6-8978-7240782707c7.png\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFbi6WSYD90xQ1TocnXVK9Ag7SLGw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcloud.githubusercontent.com%2Fassets%2F124987%2F17208678%2Ff7a40f40-54b9-11e6-8978-7240782707c7.png\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFbi6WSYD90xQ1TocnXVK9Ag7SLGw&#39;;return true;">selection_086


Tim Graham suggested I should first ask on this maillist (<a href="https://github.com/django/django/pull/6988#issuecomment-235945422" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fdjango%2Fdjango%2Fpull%2F6988%23issuecomment-235945422\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG47muZ7u--IttfljqNM78iEBZceg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fdjango%2Fdjango%2Fpull%2F6988%23issuecomment-235945422\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG47muZ7u--IttfljqNM78iEBZceg&#39;;return true;">https://github.com/django/django/pull/6988#issuecomment-235945422) to see if there is consensus to make the change.

I would like to ask your opinion about an increase from 30 to 60 characters on last_name field so that my login and others won't break again in the future. I can create a Trac ticket if the response is positive.

Kind Regards,


--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/fe86b3ce-1fcf-4ea5-9082-07a5139ce8d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

Florian Apolloner


On Saturday, July 30, 2016 at 3:25:35 PM UTC+2, Raony Guimaraes Corrêa Do Carmo Lisboa Cardenas wrote:
So I'm suggesting a change from 30 to 255 characters on last_name field, which is the maximum possible without breaking backwards compatibility. Maybe on Django 3 we can propose a change to "Full name" field ?

Technically this is breaking backwards compat, ie there might be other apps out there expecting not more than 30 chars as a result of Django's limitations. I'd rather see a proposal which does it right before we migrate once again. Ie migrate first_name + last_name to full_name and add a display_name or similar which saves how a user wants to be addressed. This also fixes issues with titles and whatnot.…

Cheers,
Florian

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/e8ac1771-8f56-4df1-a621-42effc24c02e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

Aymeric Augustin
In reply to this post by Raony Guimaraes Corrêa Do Carmo Lisboa Cardenas
Hello,

> On 30 Jul 2016, at 10:52, Raony Guimaraes Corrêa Do Carmo Lisboa Cardenas <[hidden email]> wrote:
>
> So I'm suggesting a change from 30 to 255 characters on last_name field, which is the maximum possible without breaking backwards compatibility.

I’m -1 on basing the decision of “how long a last name does Django allow by default” on an unrelated technical limit. We’re discussing how long a reasonable last name is, not how many bytes MySQL can fit in a varchar without incurring an extra byte of overhead for storing the string length.

I have trouble believing that a significant number of people are used to typing 100+ characters when inputting their name into a website — let alone that a significant number of people have a last name that contains more than 100 characters and that isn’t a joke. How would it fit on a passport?

I know that Brazilian last names are commonly in the 30-50 characters range. Going for 60 to have a bit of margin makes sense. If my estimate is too low, we could go even further. But 100 and above doesn’t make sense to me.

If you want to allow 255 characters in last names, in my opinion, you’re in the territory of custom user models.

> Maybe on Django 3 we can propose a change to "Full name" field ?

There’s a misconception about “Django 3” here. Django will guarantee the same compatibility between the last 2.x version and 3.0 than between 2.(x-1) and 2.x.

Apart from that, I think that the most reasonable path to a built-in User model not based on first and last name is to ship a new model next to the current one and suggest that developers point AUTH_USER_MODEL to that model — or, even better, that they inherit the abstract version of the new built-in model in their project and point AUTH_USER_MODEL to their copy, so that they can make changes later if needed.

Best regards,

--
Aymeric.

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/4E860166-BE82-48AF-BF63-4EECC10B03DA%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

Donald Stufft-2

> On Jul 30, 2016, at 4:40 PM, Aymeric Augustin <[hidden email]> wrote:
>
> I have trouble believing that a significant number of people are used to typing 100+ characters when inputting their name into a website — let alone that a significant number of people have a last name that contains more than 100 characters and that isn’t a joke. How would it fit on a passport?


See #6 of https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/


Donald Stufft



--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/5DE6F3BD-2AFC-4DC2-864F-D68D333587B4%40stufft.io.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

Tim Allen
In reply to this post by Raony Guimaraes Corrêa Do Carmo Lisboa Cardenas
+0 to extending the length, but the 255-character maximum in MySQL shouldn't be a concern since MySQL 5.0.3 (IIRC). I'm all for the ease of a length increase to the concern raised in the original post. While it would be nice to do more in the long term, that's a bigger discussion, as Aymeric points out.

I think it is also worth noting that creating a one-to-one UserProfile model or AbstractUser is significantly less intimidating to a newcomer and easier to change down the road than attempting an AbstractBaseUser implementation. Would it also be worth increasing the length of the `username` field to make email as username implementations easier, while we're on the topic?

While Florian bring up some good points as well, there are years and years of legacy examples on the subject out there (Stack Overflow, for one) beyond the documentation that might make the larger change more appropriate for 2.0.

Warm regards,

Tim A.

On Saturday, July 30, 2016 at 9:25:35 AM UTC-4, Raony Guimaraes Corrêa Do Carmo Lisboa Cardenas wrote:
So I'm suggesting a change from 30 to 255 characters on last_name field, which is the maximum possible without breaking backwards compatibility. Maybe on Django 3 we can propose a change to "Full name" field ?

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/369bd1d4-4b5f-4a24-bd4f-85f8792582ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

Shai Berger
In reply to this post by Donald Stufft-2
On Sunday 31 July 2016 00:15:57 Donald Stufft wrote:

> > On Jul 30, 2016, at 4:40 PM, Aymeric Augustin
> > <[hidden email]> wrote:
> >
> > I have trouble believing that a significant number of people are used to
> > typing 100+ characters when inputting their name into a website — let
> > alone that a significant number of people have a last name that contains
> > more than 100 characters and that isn’t a joke. How would it fit on a
> > passport?
>
> See #6 of
> https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-
> names/
>

See #11 of this list. If we were to take it seriously, any name field should
have an accompanying charset field. Or, actually, some substring-to-charset
mapping, because of #10. Which makes one just go straight to #36.

It isn't really a workable set of constraints.

However, since you brought it up, and since it mentions names from the Klingon
Empire, I would like to remind the supporters of MySQL-driven limits that for
encodings which can express the full range of Unicode, including Klingon and
Emoji, the MySQL limit is 191 and not 255. Just sayin'.

Shai.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

James Pic
In reply to this post by Josh Smeaton
On Sat, Jul 30, 2016 at 8:08 AM, Josh Smeaton <[hidden email]> wrote:
>
> I think having a single name field is reasonable for the vast majority of
> cases, but it fails where projects really do need to identify two names for
> things like sorting or categorising.

I'd be willing to believe that a project requires storing names as an
array of words for sorting. I can see how that would be helpful to do
sorting. Even I have a full name of 5 words and I only use two of them
because it's my culture. In this situation how to convince someone
that it's not a waste of time to have to fill in several form fields,
when they are going to the usage name they want anyway which is
conceptualized rather as an array of words than a pair of words. Some
people won't even want their real name on some projects.

> I'd be willing to argue that if you did
> need to differentiate between parts of a full name then you could customise
> your User model to account for that. The issue is backward compatibility. We
> can't just use migrations to remove the last name field because that would
> break working code and potentially delete data. It'd break a lot more than
> simply increasing the size of existing labels.

Deporting the issue on the user project is an option, but I'd like to
suggest that we keep on trying to find a curative solution for this
issue which has been brought up on regularely. It should be possible
to make a migration to add and provision the full name column and make
first and last name column read-only if they exist - but not be
provided on new projects. Even then, the backward incompatibility will
be an easy fix, it's not like we were splitting data the other way,
that would be a lot more difficult and require esoteric code, again,
just like when we try to make people fit in two distinct inputs.

Free users from our culture, open django.contrib.auth to the world.

Rock'on

James B)

--
http://yourlabs.org

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CALC3Kaf4K6yh0y-K8F2TdhTPs2h7DKQw9%2BO1xN5538gr4u1hDA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

Curtis Maloney-2
As I watch this discussion I am reminded of a talk I saw a few years ago
at PyConAU:

https://www.youtube.com/watch?v=_V4q0o-nKp4&list=PLs4CJRBY5F1KDIN6pv6daYWN_RnFOYvt0&index=33

--
Curtis


On 01/08/16 09:34, James Pic wrote:

> On Sat, Jul 30, 2016 at 8:08 AM, Josh Smeaton <[hidden email]> wrote:
>>
>> I think having a single name field is reasonable for the vast majority of
>> cases, but it fails where projects really do need to identify two names for
>> things like sorting or categorising.
>
> I'd be willing to believe that a project requires storing names as an
> array of words for sorting. I can see how that would be helpful to do
> sorting. Even I have a full name of 5 words and I only use two of them
> because it's my culture. In this situation how to convince someone
> that it's not a waste of time to have to fill in several form fields,
> when they are going to the usage name they want anyway which is
> conceptualized rather as an array of words than a pair of words. Some
> people won't even want their real name on some projects.
>
>> I'd be willing to argue that if you did
>> need to differentiate between parts of a full name then you could customise
>> your User model to account for that. The issue is backward compatibility. We
>> can't just use migrations to remove the last name field because that would
>> break working code and potentially delete data. It'd break a lot more than
>> simply increasing the size of existing labels.
>
> Deporting the issue on the user project is an option, but I'd like to
> suggest that we keep on trying to find a curative solution for this
> issue which has been brought up on regularely. It should be possible
> to make a migration to add and provision the full name column and make
> first and last name column read-only if they exist - but not be
> provided on new projects. Even then, the backward incompatibility will
> be an easy fix, it's not like we were splitting data the other way,
> that would be a lot more difficult and require esoteric code, again,
> just like when we try to make people fit in two distinct inputs.
>
> Free users from our culture, open django.contrib.auth to the world.
>
> Rock'on
>
> James B)
>

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/c4e945a3-61bd-3917-dec5-9758b0d2790e%40tinbrain.net.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

Aymeric Augustin
In reply to this post by Donald Stufft-2
> On 30 Jul 2016, at 23:15, Donald Stufft <[hidden email]> wrote:
>
> See #6 of https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/

I’m aware of this article. It's a entertaining read but, unlike the W3 Q&A mentioned earlier, it doesn’t contain actionable advice for designing a generic system that won’t perform too poorly in many use cases when you have no idea of what these use cases will be.

Once you reject the idea that “People have names”, it’s pointless to discuss modelling of name fields. If you merely reject the idea that “People’s names are all mapped in Unicode code points”, it’s still pointless to discuss how many code points names usually contain.

So let’s stay focused on a practical design, let’s do something that most people will find reasonable, and those who don’t can use custom user models.

Last names containing over 30 characters are sufficiently common — likely tens of millions of people at this time — to deserve consideration. That’s where this thread started. Let’s not block an easy win for these tens of millions because the general problem is intractable. Besides, a last_name field is already a severe simplification, as we all know.

Last names containing over 100 characters are sufficiently uncommon to be the subject of trivia articles on the Internet. I’m absolutely certain that no website has tens or thousands of millions of last names over 100 characters; in fact, not even tens of such names.

If someone has access to real-life stats from a very large database of names in a country that has long last names that could help us make an optimal decision.

If we can’t find that information, let’s go for max_length=60 and commit the change.

--
Aymeric.

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/710CA663-E7A6-405B-AC53-DE32A7FB1F12%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

James Pic
Aymeric, it doesn't matter if tens of milions of names fit into your
model, it only takes one to have a issue that's going to require the
project developers to invest time in it. So I'm a bit lost about
what's the most practical approach here.

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CALC3KaeTBeRU-S2Kk_639ikFP7Z7rxc7LAV17qcDfHM63ATh%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

Michael Manfre
I agree with Aymeric. Short of actual stats stating otherwise, I think we should use max_length=60 and accommodate most people on the planet out of the box without a non-trivial amount of time/effort. For those who want to go above an beyond for a handful of potential users, they can create a custom User model; bonus points if they make it a reusable app or even a gist.

Regards,
Michael Manfre

On Mon, Aug 1, 2016 at 9:03 AM James Pic <[hidden email]> wrote:
Aymeric, it doesn't matter if tens of milions of names fit into your
model, it only takes one to have a issue that's going to require the
project developers to invest time in it. So I'm a bit lost about
what's the most practical approach here.

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CALC3KaeTBeRU-S2Kk_639ikFP7Z7rxc7LAV17qcDfHM63ATh%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAGdCwBt%2BNtLH5OgMcCSpwbdVnQ0qU02UaRK_yWo8KhCA4QReog%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

Aymeric Augustin
In reply to this post by James Pic
Hello James,

> On 01 Aug 2016, at 15:03, James Pic <[hidden email]> wrote:
>
> Aymeric, it doesn't matter if tens of milions of names fit into your
> model, it only takes one to have a issue that's going to require the
> project developers to invest time in it.

I’m not an adept of the “worse is better” school of thought. I believe that fixing the problem for 99,9999% of people while not creating new problems for anyone matters.

There will always be cases where django.contrib.auth doesn’t work ideally. What matters is the ability to argue that a particular case is enough of an edge case not to be worth dealing with, and the person who finds themselves in that case to expect and accept that answer. Clearly “name over 30 characters” isn’t sufficiently rare to meet this criterion. (It was fine when it just had to work for LWJ’s staff.)

Some organizations will have a cost/benefit approach to this question. Making the problematic cases less frequent reduces the chances that the benefit of fixing them justifies the cost. Then developers don’t have to invest time in it. Other organizations will reject the notion of cost and have a more philosophical approach; that’s harder to discuss in general but solving a problem while not introducing any new problems still makes the situation better for them. At the very least they get a better base to build upon.

Anyone who likes using an absurdly long last name, for whatever reason, and enjoys typing it just to get a “name too long” error message on every website knows how to fix it: use a subset of their name. They’re already doing it whenever they fill a form, whether on paper or on screen. Paper forms usually don’t have room for writing names on multiple lines.

Can you just let use improve the situation for tens of millions of Brazilian users? It doesn’t cost you, or anyone else, anything. Just let us make things better for tens of millions of people and not make them worse for anyone.

To be extremely clear, let me repeat once again: I’m not trying to make django.contrib.auth to work for everyone, I know that it still won’t work for everyone and I accept that my proposal doesn’t attempt to solve the problem of names entirely. It has been abundantly explained in this thread why it’s impossible to do something that works for everyone anyway. If we wanted to do something that worked for significantly more people, we’d start by dropping the first / last name fields. You’re welcome to make a proposal in that direction, but I would kindly ask you to do it a a new thread and let us solve that stupid name length problem for tens of millions of Brazilian users in this thread.


> So I'm a bit lost about what's the most practical approach here.

Per my definition of “practical”, fixing 99,9999% of a problem with a very small effort like I suggested is a practical approach.


--
Aymeric

--
You received this message because you are subscribed to the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/ED879BC4-F89D-48D6-9B09-2778FBDBF998%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Extend support for long surnames in Django Auth

Raony Guimaraes Corrêa Do Carmo Lisboa Cardenas
Dear all,

I kind of agree with Aymeric, increasing last_name to max=60 characters would already be good enough for this proposal and should cover 99.99% of users without breaking backward compatibility.

I support your idea of a built-in User model not based on first and last name. But that sounds too much of a challenge for me at the moment.

I'm also missing some data to back up this claim, but 30-50 characters for last_names in Brazil sounds about right. I will check some databases I have access, but my opinion is that this is already going in a good direction!

Thank you all for the support and discussion.

Kind Regards.
_____________________________________________

Raony Guimarães Corrêa Do Carmo Lisboa Cardenas
PhD in Bioinformatics

email: [hidden email]
skype/hangouts: raonyguimaraes
phone: +48 722 148 478
_____________________________________________

On Mon, Aug 1, 2016 at 3:45 PM, Aymeric Augustin <[hidden email]> wrote:
Hello James,

> On 01 Aug 2016, at 15:03, James Pic <[hidden email]> wrote:
>
> Aymeric, it doesn't matter if tens of milions of names fit into your
> model, it only takes one to have a issue that's going to require the
> project developers to invest time in it.

I’m not an adept of the “worse is better” school of thought. I believe that fixing the problem for 99,9999% of people while not creating new problems for anyone matters.

There will always be cases where django.contrib.auth doesn’t work ideally. What matters is the ability to argue that a particular case is enough of an edge case not to be worth dealing with, and the person who finds themselves in that case to expect and accept that answer. Clearly “name over 30 characters” isn’t sufficiently rare to meet this criterion. (It was fine when it just had to work for LWJ’s staff.)

Some organizations will have a cost/benefit approach to this question. Making the problematic cases less frequent reduces the chances that the benefit of fixing them justifies the cost. Then developers don’t have to invest time in it. Other organizations will reject the notion of cost and have a more philosophical approach; that’s harder to discuss in general but solving a problem while not introducing any new problems still makes the situation better for them. At the very least they get a better base to build upon.

Anyone who likes using an absurdly long last name, for whatever reason, and enjoys typing it just to get a “name too long” error message on every website knows how to fix it: use a subset of their name. They’re already doing it whenever they fill a form, whether on paper or on screen. Paper forms usually don’t have room for writing names on multiple lines.

Can you just let use improve the situation for tens of millions of Brazilian users? It doesn’t cost you, or anyone else, anything. Just let us make things better for tens of millions of people and not make them worse for anyone.

To be extremely clear, let me repeat once again: I’m not trying to make django.contrib.auth to work for everyone, I know that it still won’t work for everyone and I accept that my proposal doesn’t attempt to solve the problem of names entirely. It has been abundantly explained in this thread why it’s impossible to do something that works for everyone anyway. If we wanted to do something that worked for significantly more people, we’d start by dropping the first / last name fields. You’re welcome to make a proposal in that direction, but I would kindly ask you to do it a a new thread and let us solve that stupid name length problem for tens of millions of Brazilian users in this thread.


> So I'm a bit lost about what's the most practical approach here.

Per my definition of “practical”, fixing 99,9999% of a problem with a very small effort like I suggested is a practical approach.


--
Aymeric

--
You received this message because you are subscribed to a topic in the Google Groups "Django developers  (Contributions to Django itself)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-developers/h98-oEi7z7g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/ED879BC4-F89D-48D6-9B09-2778FBDBF998%40polytechnique.org.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CALenahmzbDU7GOM8x%2BxN1gCS4woAOFrUs_CipFnpq9cOVYogJA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
123