๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

TIL/ETC

์žฅ๊ณ  ์„œ๋ฒ„ ๋„์šฐ๊ธฐ

1. ๊ฐ€์ƒํ™˜๊ฒฝ ์„ค์น˜ & ์‹คํ–‰

virtualenv env
source env/bin/activate

2. ํŒจํ‚ค์ง€ ์„ค์น˜

pip install -r requirements.txt

ํŒ€์›๋“ค์ด requirements.txt ์— ์ €์žฅํ•ด๋†“์€ ํŒจํ‚ค์ง€ ํŒŒ์ผ๋“ค์„ ์„ค์น˜

[์ฐธ๊ณ ] ๋งŒ์•ฝ ๋‚ด๊ฐ€ ์ƒˆ๋กœ์šด ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•ด์„œ ํŒ€์›๋“ค์—๊ฒŒ ์•Œ๋ฆฌ๊ธฐ ์œ„ํ•ด requirements.txt๋ฅผ ์—…๋ฐ์ดํŠธ ํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ

pip freeze > requirements.txt

3. ์„œ๋ฒ„ ์‹คํ–‰

python manage.py runserver

4. ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ์„ค์ •

python manage.py migrate