Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- nomadcoder
- 매핑
- web
- 트랜잭션
- 바닐라js
- python
- JPA
- frontend
- React
- ORM
- java
- 장고독학
- 일대다
- 플러시
- 노마드코더
- SBERT
- JS
- 장고
- 다대다
- TODO
- 프론트엔드
- css
- clonecoding
- AWS
- 영속성 컨텍스트
- 다대일
- Django
- javascript
- 단방향
- html
Archives
- Today
- Total
꿈꾸는 새벽하늘
[Clone Coding] Django-React Project: Task Manager Application (2) Create the API 본문
💻 Programming
[Clone Coding] Django-React Project: Task Manager Application (2) Create the API
rovemin 2023. 1. 25. 22:13Install: django Rest Framework & django-cors-headers

settings.py 수정: Whitelisting React port


Whitelisting React port: let frontend of the application to interact with the API in django
serializers.py 생성

serializers.py: to convert the model instances to JSON so that the frontend can work with the received data easily
cf. JSON: the standard for data interchange on the web
views.py

urls.py

routers: basically make some queries
- tasks: return a list of all the tasks or the todo items
- task: return a single task item or todo item
🔍︎ localhost:8000/api

🔍︎ localhost:8000/api/tasks


'💻 Programming' 카테고리의 다른 글
| [Django] 1. 개발환경 구축 및 프로젝트 생성 (0) | 2023.02.05 |
|---|---|
| [Clone Coding] Django-React Project: Task Manager Application (3) Connect Frontend and Backend (0) | 2023.01.28 |
| [Clone Coding] Django-React Project: Task Manager Application (1) Run Server (0) | 2023.01.25 |
| [VSCode] C++ 파일 분할 컴파일 (0) | 2022.08.26 |
| [Python] 파이썬 기본 문법 총정리 2 - 자료형(Data Type): 리스트 (0) | 2022.07.31 |