How to start a new Django project using poetry?
With virtualenv it is simple:
virtualenv -p python3 env_name --no-site-packages
source env_name/bin/activate
pip install django
django-admin.py startproject demo
pip freeze > requirements.txt
What will be equivalent to this using Poetry?
$ django-admin startproject myproject .
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
$ poetry run django-admin.py startproject djangodemo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With