We have to run two servers if we want to use React App as a SPA server and use Django app as an APIs server. What if we only want to launch one server on the machine?
The target for this week is to understand the process of creating endpoints in DRF (Django REST Framework).
Please refer to my article. It includes four parts.
- Overview (models, serializers, views, and urls)
- Views and URLS: Type 1. Use APIview
- Views and URLS: Type 2. Use viewsets.ModelViewSet
There are some of my articles. Feel free to check if you like!