Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #31371 -- Increased User.first_name max_length to 150 characters. #12581

Merged
merged 1 commit into from Mar 18, 2020

Conversation

ryanpetrello
Copy link
Contributor

@ryanpetrello ryanpetrello commented Mar 17, 2020

Increases the max_length of first_name in django.contrib.auth to 150 characters to facilitate longer first names.

Fixes ticket-31371

@ryanpetrello
Copy link
Contributor Author

ryanpetrello commented Mar 17, 2020

The 30 character first name limit has been reported in another open source project I maintain (which uses Django), Ansible AWX: ansible/awx#6281

This PR updates the field to match the (expanded) length of the last name field.
This PR is very similar to a change made to the User model for last_name field a few years ago:

https://code.djangoproject.com/ticket/26993
#7923

Copy link
Member

@hramezani hramezani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ryanpetrello.

Please change the migration file name:
0012_alter_user_last_name_max_length.py -> 0012_alter_user_first_name_max_length.py

Please change the user model first_name field doc. Please add a .. versionchanged:: as well.

@ryanpetrello
Copy link
Contributor Author

Thanks @hramezani; feedback addressed.

@felixxm felixxm changed the title Fixed #31371-- Increased User.first_name max_length to 150 characters. Fixed #31371-- Increased User.last_name max_length to 150 characters. Mar 18, 2020
@felixxm felixxm changed the title Fixed #31371-- Increased User.last_name max_length to 150 characters. Fixed #31371-- Increased User.first_name max_length to 150 characters. Mar 18, 2020
@felixxm felixxm self-assigned this Mar 18, 2020
@felixxm felixxm changed the title Fixed #31371-- Increased User.first_name max_length to 150 characters. Fixed #31371 -- Increased User.first_name max_length to 150 characters. Mar 18, 2020
@felixxm
Copy link
Member

felixxm commented Mar 18, 2020

@ryanpetrello Thanks 👍 I added some docs. Welcome aboard ⛵

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants