我试图制作我的第一个django项目,startproject运行正常但是当我尝试runserver时,这是我得到的追溯错误:
File "C:\Python27\lib\site-packages\django-1.9-py2.7.egg\django\contrib\auth\f orms.py", line 269, in SetPasswordForm
help_text=password_validation.password_validators_help_text_html())
File "C:\Python27\lib\site-packages\django-1.9-py2.7.egg\django\contrib\auth\password_validation.py", line 85, in password_validators_help_text_html
help_texts = password_validators_help_texts(password_validators)
File "C:\Python27\lib\site-packages\django-1.9-py2.7.egg\django\contrib\auth\password_validation.py", line 74, in password_validators_help_texts
password_validators = get_default_password_validators()
File "C:\Python27\lib\site-packages\django-1.9-py2.7.egg\django\utils\lru_cach e.py", line 101, in wrapper
result = user_function(*args, **kwds)
File "C:\Python27\lib\site-packages\django-1.9-py2.7.egg\django\contrib\auth\p assword_validation.py", line 21, in get_default_password_validators
return get_password_validators(settings.AUTH_PASSWORD_VALIDATORS)
File "C:\Python27\lib\site-packages\django-1.9-py2.7.egg\django\contrib\auth\p assword_validation.py", line 32, in get_password_validators
validators.append(klass(**validator.get('OPTIONS', {})))
File "C:\Python27\lib\site-packages\django-1.9-py2.7.egg\django\contrib\auth\p assword_validation.py", line 164, in __init__
with open(password_list_path) as f: IOError: [Errno 2] No such file or directory: u'C:\\Python27\\lib\\site-packages \\django-1.9-py2.7.egg\\django\\contrib\\auth\\common-passwords.txt.gz'
我的智慧结束了,请帮助
答案 0 :(得分:0)
您的django 1.9安装错误common-passwords.txt.gz文件。
尝试安装此版本似乎需要的pip install django-password-validation
。或者只是手动将文件放到C:\Python27\lib\site-packages\django-1.9-py2.7.egg\django\contrib\auth\