well-balanced

[TIL] 기록 90일차 본문

TIL : study log

[TIL] 기록 90일차

Cosmian 2020. 1. 30. 22:52

Today I Learned

  • 프로젝트를 구상해봤다. 카드사에서 제공하는 할인혜택을 정리하는 Web을 만들어보려고 한다.
    • 그동안 서버 언어로써 Node.js와 Template engine을 통해 Server-Side-Rendering 방식으로 좀 설계를 해봤으니 이번에는 Django + React로 CSR 방식으로 동작하는 웹 애플리케이션을 만들어볼 예정.
    • 카드사에서 제공하는 API에 대해 좀 찾아봤는데 아무래도 개인으로써 API를 쓰기는 좀 힘들어보인다.
    • 일단 Django를 조금 더 공부를 하고 시작해보는게 좋다는 생각이 들었다.

migrate 명령과 makemigration 명령의 차이

The migrate command takes all the migrations that haven’t been applied (Django tracks which ones are applied using a special table in your database called django_migrations) and runs them against your database - essentially, synchronizing the changes you made to your models with the schema in the database.

The reason that there are separate commands to make and apply migrations is because you’ll commit migrations to your version control system and ship them with your app; they not only make your development easier, they’re also usable by other developers and in production.

makemigration 명령은 모델의 변경사항을 감지하고 변동사항에 따라 파일을 만들어낸다. 

migrate 명령은 makemigration으로 만들어진 파일을 데이터베이스에 적용한다.

 

View가 하는 일

A view is a “type” of Web page in your Django application that generally serves a specific function and has a specific template.

뷰는 일반적으로 특정 함수를 전달하고, 특정 template을 갖는 장고 웹페이지의 타입이다.

Model에서 정보를 받아와 Template을 컨트롤한다.

 

+ 걍 좋았던 대목

Now in your time on the web you may have come across such beauties as “ME2/Sites/dirmod.asp?sid=&type=gen&mod=Core+Pages&gid=A6CD4967199A42D9B65B1B”. You will be pleased to know that Django allows us much more elegant URL patterns than that.

 

'TIL : study log' 카테고리의 다른 글

[TIL] 기록 92일차  (0) 2020.02.01
[TIL] 기록 91일차  (0) 2020.01.31
[TIL] 기록 89일차  (0) 2020.01.29
[TIL] 기록 88일차  (0) 2020.01.28
[TIL] 기록 87일차  (0) 2020.01.27
Comments