#20846: Increase contrib.auth's User.username length
------------------------------+--------------------------------------
     Reporter:  ivoras@…      |                    Owner:  nobody
         Type:  New feature   |                   Status:  new
    Component:  contrib.auth  |                  Version:  1.5
     Severity:  Normal        |               Resolution:
     Keywords:                |             Triage Stage:  Unreviewed
    Has patch:  1             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  1             |                    UI/UX:  0
------------------------------+--------------------------------------

Comment (by hwkns):

 Apologies for re-opening if that was not the correct course of action.  I
 just got burned by this issue, after migrating a very large Django
 project, from 1.6 using the third-party `longerusername` package, to 1.7
 (for which that package does not yet have a migration).  This is our only
 blocker for deploying with 1.7, and it's painful that my choices are to
 either create a custom User model or fork a third-party library.

 Replying to [comment:9 carljm]:
 > Replying to [comment:6 hwkns]:
 > > Replying to [comment:1 russellm]:
 > > > If we applied the diff you describe, every Django user on the planet
 would need to issue a migration on their database
 > >
 > > Is this even true?  Wouldn't this migration only have to run if the
 user was already running `manage.py migrate` ?  And if the user never ran
 that command, they would just keep the old limit of 30?
 >
 > If they never run `migrate`, that results in a much much worse
 situation, because their models no longer match their database schema,
 meaning that instead of getting nice Django-level form validation errors,
 they now get unpredictable errors depending on their database backend --
 some backends will silently truncate the data, some will raise a database-
 error resulting in a 500 Internal Server Error.
 `max_length` can and should be specified in forms for validation.  It was
 my impression that the model's `max_length` information was only for the
 database backend...  is that inaccurate?

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/074.9b83bd507145daf35318e7055291a2d0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to