简体   繁体   English

为什么我在创建超级用户 django 时会收到此错误?

[英]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:我目前正在使用 django 4 和 python 3.10 尝试创建超级用户,但出现此错误:

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 .您将min_length拼错为min_lenght

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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