简体   繁体   中英

why do i get this error creating superuser django?

I'm currently using django 4 and python 3.10 trying to create a superuser but I get this error:

Traceback (most recent call last):
  File "C:\Users\sebas\Desktop\django2\myvenv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py", line 159, in handle
    validate_password(password2, self.UserModel(**fake_user_data))
  File "C:\Users\sebas\Desktop\django2\myvenv\lib\site-packages\django\contrib\auth\password_validation.py", line 44, in validate_password
    password_validators = get_default_password_validators()
  File "C:\Users\sebas\Desktop\django2\myvenv\lib\site-packages\django\contrib\auth\password_validation.py", line 19, in get_default_password_val
idators
    return get_password_validators(settings.AUTH_PASSWORD_VALIDATORS)
  File "C:\Users\sebas\Desktop\django2\myvenv\lib\site-packages\django\contrib\auth\password_validation.py", line 30, in get_password_validators
    validators.append(klass(**validator.get('OPTIONS', {})))

TypeError: MinimumLengthValidator.__init__() got an unexpected keyword argument 'min_lenght'

You have misspelled min_length with min_lenght .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM