Django ์์ํ๊ธฐ
0. ์์ฑ ๋ฐ ํ์ฑํ (git bash)
$ python -m venv [๊ฐ์ํ๊ฒฝ์ด๋ฆ]
$ source [๊ฐ์ํ๊ฒฝ์ด๋ฆ]/Scripts/activate
$ pip list
1. ๊ฐ์ํ๊ฒฝ ์์ฑ ๋ฐ ํ์ฑํ
ctrl+shift+p - select interpreter venv์ค์
$ pip install django==3.2.12
2. ํ๋ก์ ํธ ์์ฑ
$ django-admin startproject [ํ๋ก์ ํธ ์ด๋ฆ] .
3. Django์๋ฒ ์์ํ๊ธฐ(ํ์ฑํ)
ls๋ก manage.py์๋ ํ์ธํ๊ณ ํ๊ธฐ!
$ python manage.py runserver
4. ๋ฉ์ธ ํ์ด์ง ๋ก์ผ ํ์ธ
5. Application ์์ฑ - Application ๋ช ์ ๋ณต์ํ์ผ๋ก ํ๊ธฐ!
$ python manage.py startapp [Application๋ช
]
6. ์ฑ ๋ฑ๋ก
ํ๋ก์ ํธ์ #setting.py์์ INSTALLED_APPS์ Application ์ถ๊ฐํด์ฃผ๊ธฐ
๋ฐ๋์ ์์ฑ ํ ๋ฑ๋ก!
'Development > Django' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Django (0) | 2022.03.07 |
---|
๋๊ธ