I have run into the following error trying to create a user in django:
>>> email = 'verylongemail@verylongemail.com'
>>> user_object = User.objects.create_user(username=email, email=email, password='password')
Data truncated for column 'username' at row 1
It seems Django has a limit on the number of chars allowed in a username. How would I get around this?
You have to modify the username length field so that syncdb will create the proper length varchar and you also have to modify the
AuthenticationFormto allow greater values as well or else your users won’t be able to log in.