PROJECTS

VSC ๋กœ Django ํ„ฐ๋ฏธ๋„ ์‹คํ–‰ ์‹œํ‚ค๊ธฐ | ์ธํ„ฐํ”„๋ฆฌํ„ฐ ์„ค์ • | conda | MAC

nicesugi 2022. 5. 26. 21:55

๐Ÿ‘ฉ๐Ÿป‍๐Ÿ’ป Github

https://github.com/nicesugi/sparta.git


djangoStudy = ๊ฐ€์ƒํ™˜๊ฒฝ ์ด๋ฆ„

project_1 = py ํŒŒ์ผ๋“ค์ด ๋“ค์–ด๊ฐˆ ํด๋” ์ด๋ฆ„

 

conda create -n djangoStudy   / ๊ฐ€์ƒํ™˜๊ฒฝ ์ƒ์„ฑ

conda activate djangoStudy   / ๊ฐ€์ƒํ™˜๊ฒฝ ํ™œ์„ฑํ™”

django-admin startproject project_1   / ์žฅ๊ณ  ๊ธฐ๋ณธ ํŒŒ์ผ ์ƒ์„ฑ

ls   /   cd ..      / ๋ฅผ ์ด์šฉํ•ด์„œ manage.py๋ฅผ ์ฐพ๊ธฐ

          ls : ํ˜„์žฌ ์œ„์น˜๋Š”?     

          cd .. ๋’ค๋กœ๊ฐ€๊ธฐ(๊ผญ ๋„์–ด์“ฐ๊ธฐ ํฌํ•จ์ž…๋‹ˆ๋‹ค)

python manage.py migrate     / ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค ์„ค์ •๊ณผ ํ…Œ์ด๋ธ” ์ƒ์„ฑ

python manage.py runserver      / ์‹คํ–‰

 

 

์•„๋ž˜๋กœ ๋‚ด๋ ค๋ณด์‹œ๋ฉด ์‹คํ–‰ ํ›„์˜ ํƒ์ƒ‰๊ธฐ(ํด๋”) ์™€ ๋ธŒ๋ผ์šฐ์ € ํ™”๋ฉด์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.


 

1
2

2๋ฒˆ ์ด๋ฏธ์ง€๋ฅผ ๋ณด๋ฉด, Starting development server at http://127.0.0.1:8000/

๋งฅ์˜ ๊ฒฝ์šฐ)   โŒ˜command + ํด๋ฆญ ์œผ๋กœ ๋ธŒ๋ผ์šฐ์ €๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

 

 

ํƒ์ƒ‰๊ธฐ ํ™”๋ฉด์„ ๋ณด๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ํ•„์š”ํ•œ ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๊ฐ€ ์ƒ๊น๋‹ˆ๋‹ค.

 

์™ผ-ํƒ์ƒ‰๊ธฐ / ์šฐ-์žฅ๊ณ  ๋ธŒ๋ผ์šฐ์ € ๋„์šฐ๊ธฐ

 


 

- ์ธํ„ฐํ”„๋ฆฌํ„ฐ ์„ค์ •

์ธํ„ฐํ”„๋ฆฌํ„ฐ ์„ค์ •

 

โŒ˜โ‡งP     command+Shift+P > Select Interpreter ์—์„œ ๋‚ด๊ฐ€ ๋งŒ๋“  ๊ฐ€์ƒํ™˜๊ฒฝ์„ ์„ ํƒํ•ด์ค๋‹ˆ๋‹ค.

์ƒ๋‹จ์˜ ์ธํ„ฐํ”„๋ฆฌํ„ฐ ์„ค์ •์„ ํ•œ๋‹ค. (์ƒ๋‹จ์˜ ํ•˜์–€๋ฐ•์Šค-/opt/homebrew/~~~~~~/djangoStudy)

ํ•˜๋‹จ์˜ ์„ค์ •๋„ ์œ„์™€ ๊ฐ™์€ ํ™˜๊ฒฝ์ธ์ง€ ํ™•์ธํ•œ๋‹ค. (ํ•˜๋‹จ์˜ ํ•˜์–€๋ฐ•์Šค-'djangoStudy':conda)

๋ฐ˜์‘ํ˜•