I\'m using Django allauth as my user account framework for my django site. The docs show there is an ACCOUNT_USERNAME_MIN_LENGTH however there is no ACCOUNT_USERNAME_MAX_L
You should use a max length validator like below. More documentation about validators here.
from django.core.validators import MaxLengthValidator
from allauth.account.forms import SignupForm
class AllauthSignupForm(SignupForm):
def __init__(self, *args, **kwargs):
self.fields['username']['validators'] += MaxLengthValidator(150, "Username should be less than 150 character long")