[Fixed]-How to start a new Django project using poetry?


Create a new project folder and step in:

$ mkdir djangodemo
$ cd djangodemo

Create a basic pyproject.toml with django as dependency:

$ poetry init --no-interaction --dependency django

Create venv with all dependencies needed:

$ poetry install

Init your demo-project:

For Django versions after 4:

$ poetry run django-admin startproject djangodemo

For Django version less than 4:

$ poetry run django-admin.py startproject djangodemo

Leave a comment