Poetry 설치

공식 문서 참고 

 

Introduction | Documentation | Poetry - Python dependency management and packaging made easy

Using alternative installation methods will make Poetry always use the Python version for which it has been installed to create virtualenvs. So, you will need to install Poetry for each Python version you want to use and switch between them.

python-poetry.org


1. 프로젝트 디렉터리 생성

mkdir goboard

 

2. Poetry 설정

(1) poetry 파일 생성 및 설정

touch pyproject.toml

[tool.poetry]
name = "goboard"
version = "0.1.0"
description = ""
authors = ["goboard kim<demo@demo.com>"]

[tool.poetry.dependencies]
python = "^3.9.1"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

 

(2) Django dependency 추가

poetry add django==3.1.3

3. django 프로젝트 생성

django-admin startproject config .

 

 

4. Django App 생성

django-admin startapp goboo

 

5. Django 프로젝트 결과

goboard
├── README.md
├── config
│   ├── __init__.py
│   ├── __pycache__
│   ├── asgi.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── db.sqlite3
├── goboo
│   ├── __init__.py
│   ├── admin.py
│   ├── apps.py
│   ├── migrations
│   ├── models.py
│   ├── tests.py
│   └── views.py
├── manage.py
├── poetry.lock
└── pyproject.toml

'Django > TIL etc' 카테고리의 다른 글

[Django 패키지] flake8 사용법  (0) 2022.01.21
파이썬 패키지 관리툴 poetry 소개  (0) 2022.01.21
모바일 앱을 위한 장고  (0) 2022.01.20
Django REST Framework 튜토리얼  (0) 2022.01.20
MVC 패턴이 뭐야?  (0) 2022.01.20

+ Recent posts