I have created a new django proejct and the only modification I have made is to the settings, changing the database from sqlite to postgres:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': BASE_DIR / 'yachtdrop',
'USER': 'postgres',
'PASSWORD': 'passsword',
'HOST': '127.0.0.1',
'PORT': '5432',
}
}
I am using pipenv to manage my virtual environment, my pipfile is as follows:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
django = "*"
requests = "*"
flask = "*"
psycopg2-binary = "*"
[dev-packages]
[requires]
python_version = "3.9"
When I write the command 'python manage.py runserver', the system returns 'TypeError: object of type 'WindowsPath' has no len()' and I don't understand why this is happening. I am running this on Windows. I have recently reset my Windows system and have a fresh installation of python, pipenv and postgres.
It would be great if anyone could help me out here. Thanks!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…