본문 바로가기
BE/Python & Django REST API

[Django REST API] 1. 개요

by 건빵거늬 2021. 12. 16.

1. 과정

1. course introduction

2. setting up dev environment

3. setting up project

4. create dev server

5. create django app

6. setup the database

7. setup django admin

8. introduction to APIview

9. introduction to ViewSets

10. Create User Profiles API

11. Create login API

12. Create profile feed API

13. Deploy API to server on AWS

 

2. 필요한 기술

 

1. development server

(1) VAGRANT

우리 앱에 필요한 서버가 무엇인지 명시해줌. 

vagrant docker 차이점?

docker

어플리케이션을 돌리는 이미지를 만들기 위한 모든 스텝들을 담고 있는 docker file을 작성하는 방식.
docker는 build 단계에서 모든 dependencies와 code를 install한다.
production 단계에서 사용하기 때문에 배우기 어려움

결론: 고수용, 실제서비스용

vagrant

가상개발환경을 다루기 위해 사용함. 
그렇지만 가상기술이 vagrant에 있는 것은 아니다.
대신 가상기술로 VirtualBox와 같은 hypervisor 제품을 이용한다.
개발서버를 만들기 위한 모든 스텝들을 담고 있는 vagrant file을 작성하는 방식.
그러면 vagrant는 hypervisor로 서버를 만들고 설정한다.
다양한 hypervisor를 사용할 수 있기 때문에 다양한 os에서 돌릴 수 있다.

결론: 초보용, 간단작업용



(2) VirtualBox

설정을 vargant 파일에 저장하면 vagrant는 VirtualBox를 이용하여 local machine과 분리된 virtual server을 열어준다. virtual server는 모든 requirement까지 다 설정되어 있다.

2. applicaiton code

(1) layer #1 python

(2) layer #2 django

(3) layer #3 django REST framework

3. tool

(1) ATOM

github에서 지원하는 editor

(2) git

(3) mod header

chrome browser extensions. API를 테스트할 때 http header를 수정할 수 있게 해준다

 

3. 스택 오버플로우에서 질문하는 법

https://londonappdeveloper.com/how-to-ask-questions-on-stack-overflow-and-get-answers/

 

How to ask questions on Stack Overflow (and get answers)

A lot of people ask me questions when something isn’t working. While I’m more than happy to help where I can, the questions I tend to get don’t outline enough information for …

londonappdeveloper.com

 

댓글