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

๐Ÿ’ชBackend/Django

Django๋กœ Pinterest ๋”ฐ๋ผ๋งŒ๋“ค๊ธฐ : ์„น์…˜ 0.Intro

 

#1 ๋ฌด์—‡์„ ๋งŒ๋“ค ๊ฒƒ์ธ์ง€

⇒ pinterest ๋”ฐ๋ผํ•˜๊ธฐ pinterest ์›น ๋ ˆ์ด์•„์›ƒ์„ ๋ณธ๋”ฐ์„œ ๊ธฐ๋ณธ์ ์ธ ์›น ๋งŒ๋“ค์–ด๋ณด๊ธฐ

 

 


#2 ์›น์„œ๋น„์Šค ๊ตฌ์กฐ

 

 

vultr ๋ง๊ณ ๋„ aws ๋“ฑ ์–ด๋–ค ์„œ๋ฒ„๋„ ์ƒ๊ด€ ์—†๊ณ  ์ด๋Ÿฐ ์‹์œผ๋กœ~~

 

 


 

#3 Pycharm

pycharm > ์ƒˆ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ํ›„ > django ์„ค์น˜

 

django-admin startproject <ํ”„๋กœ์ ํŠธ๋ช…>

⇒ ์žฅ๊ณ  ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ

 

์„ค์ • > ์ธํ„ฐํ”„๋ฆฌํ„ฐ > ๊ฐ€์ƒํŒŒ์ด์ฌ ํ™˜๊ฒฝ ์„ธํŒ…

  • .\activate.ps1
+ CategoryInfo : ๋ณด์•ˆ ์˜ค๋ฅ˜: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess

์œ„ ์˜ค๋ฅ˜ ๋ฐœ์ƒํ•˜๋ฉด PowerShell ๊ด€๋ฆฌ์ž ๋ชจ๋“œ๋กœ ๋“œ๊ฐ€์„œ Set-ExecutionPolicy Unrestricted ์ž…๋ ฅ ํ›„ setting ๋ฐ”๊ฟ”์ฃผ๊ธฐ

 

pragmatic ํ™˜๊ฒฝ์œผ๋กœ ์ •์ƒ ์ž‘๋™!!

runserver ํ•ด๋ณด๋ฉด

 

install worked successfully

 


 

#4 django ๊ฐœ๋ฐœ ํŒจํ„ด

 

MVC (Model View Controller) ๋กœ ๋‚˜๋‰˜์–ด ๊ตฌ์ถ•๋จ

Model

๊ตณ์ด db์ชฝ ์–ธ์–ด๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š์•„๋„ ๋ฐ์ดํ„ฐ๋ฅผ ์“ฐ๊ณ /์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ด์คŒ

Database ⇒ Row, Columns ์œผ๋กœ ์ด๋ฃจ์–ด์ง

๋ชจ๋ธ์„ ์„ค์ •ํ•ด์ฃผ๊ธฐ๋งŒ ํ•˜๋ฉด database์— ์‚ญ์ œํ•˜๊ฑฐ๋‚˜ ์ˆ˜์ •ํ•˜๊ฑฐใ…ใ„ด๋“ฑ๋“ฑ ์žฅ๊ณ ๊ฐ€ ์•Œ์•„์„œ ํ•ด์คŒ

View

Request ⇒ Server ์š”์ฒญ์„ ํ•˜๋ฉด ์‘๋‹ต์„ ํ•˜๊ธฐ ์œ„ํ•œ ์ ˆ์ฐจ๊ฐ€ ์žˆ์Œ(๋กœ๊ทธ์ธ์ด ๋˜์–ด ์žˆ๋Š”์ง€ ๋“ฑ๋“ฑ )

์œ„์˜ ์ ˆ์ฐจ๋ฅผ ๋ฐ›์•„ ๋˜๋Œ๋ ค์ฃผ๋Š” ..

Template

JS/HTML/….

์œ ์ €๊ฐ€ ๋ณด๋Š” ๋‚ด์šฉ๋“ค์„ ์–ด๋–ป๊ฒŒ ์ƒ์„ฑํ•ด ๋‚ผ ๊ฒƒ์ธ์ง€

์–ด๋–ค ๊ฒŒ์‹œ๊ธ€์— ๋Œ€ํ•ด ์š”์ฒญ์„ ๋ณด๋ƒˆ์œผ๋ฉด ๊ทธ ๊ฒŒ์‹œ๊ธ€์„ ์ „๋‹ฌํ•ด์ค˜์•ผํ•จ. ์ด๋ฅผ ๊ตฌํ˜„ํ•ด์ค„ ์ž‘์—…์„ ํ•ด์ฃผ๋Š” ๊ฒƒ

 

 


๋ฐ•ํ™์„๋‹˜์˜ ์ธํ”„๋Ÿฐ ๊ฐ•์˜๋ฅผ ์ˆ˜๊ฐ•ํ•˜๋ฉฐ ์ •๋ฆฌํ•ด๋ณด๋Š” ๊ธ€์ž…๋‹ˆ๋‹ค.

https://www.inflearn.com/course/%EC%9E%A5%EA%B3%A0-%ED%95%80%ED%84%B0%EB%A0%88%EC%8A%A4%ED%8A%B8

 

์ž‘์ •ํ•˜๊ณ  ์žฅ๊ณ ! Django๋กœ Pinterest ๋”ฐ๋ผ๋งŒ๋“ค๊ธฐ : ๋ฐ”๋‹ฅ๋ถ€ํ„ฐ ๋ฐฐํฌ๊นŒ์ง€ ๊ฐ•์˜ - ์ธํ”„๋Ÿฐ

Python์˜ ๋Œ€ํ‘œ ์›น ํ”„๋ ˆ์ž„์›Œํฌ django๋ฅผ ์ด์šฉํ•ด Pinterest ํŠน์œ ์˜ ์นด๋“œํ˜• ๋ ˆ์ด์•„์›ƒ ๋””์ž์ธ์„ ๋ณธ๋”ด ์›น์„œ๋น„์Šค ๊ตฌํ˜„ํ•ด๋ด…๋‹ˆ๋‹ค., django, docker ์‹ค์ „ ๊ฐœ๋ฐœ์„ ํ†ตํ•ด ํ•œ ๋‹จ๊ณ„ ๋†’์€ ๊ฐœ๋ฐœ์ž๊ฐ€ ๋˜์–ด๋ณด์„ธ์š”! ๐Ÿ“ฃ ํ™•์ธ

www.inflearn.com