Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3810444
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T15:27:41+00:00 2026-05-19T15:27:41+00:00

Before somebody marks this question as a duplicate of this question Can django’s auth_user.username

  • 0

Before somebody marks this question as a duplicate of this question Can django’s auth_user.username be varchar(75)? How could that be done? or other such questions on SO, please read this question. The question I linked to asks this question precisely but unfortunately the answers don’t address the question that was asked.

Can I change the auth_user.username field to be 100 characters long by doing the following:

  1. Run ALTER table in DB for the username field
  2. Change the max_length here: username = models.CharField(_('username'), max_length=30, unique=True, help_text=_("Required. 30 characters or fewer. Letters, numbers and @/./+/-/_ characters"))

Would it break anything in Django if I were to do this?

That this will break when I update Django to a higher version is not a problem. I’m also not looking at writing other authentication methods.I just want to know if I would break anything if I were to do this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T15:27:42+00:00Added an answer on May 19, 2026 at 3:27 pm

    You need to monkey-patch max-length in several places: model-field’s description, form-field’s description and max-length validators. Max-length validators are attached to form-fields as well as model-fields.

    Here is a code snippet, which will patch everything:

    https://gist.github.com/1143957 (tested with django 1.2 and 1.3)

    Update:
    Good news! Since django 1.5 you can override user model: Customizing the User model

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Before somebody points me to that question, I know that one can't parse html
before I start I want to point out that I tagged this question as
I have looked around here to see if somebody has asked this question before
I did a search for this question thinking that somebody must have asked it
I've never seen this before. Please can somebody shed some light on it for
I bet somebody has solved this before, but my searches have come up empty.
Can somebody explain to me what the below code is doing. before and after
Before asking the question let me preface with the fact that I am new
Before I ask my question, I want to mention that I am only today
before I ask my question I wanted to let everybody know that I appreciate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.