Зміст курсу
Django REST Framework
1. What is the Rest API ?
4. HTTP Request Methods
Django REST Framework
Overview of Course Project
During the course, we will learn to create and configure: models, serializers, URL addresses, and views. With this knowledge, we will collectively build a full-fledged server-side application.
![files list](https://codefinity-content-media.s3.eu-west-1.amazonaws.com/2094862b-414e-43a2-b303-58f071838bf6/Section+2/c1f4a768-cc7b-4b61-bf73-29f3c06fc72f.png)
When a user navigates to a link in a Django Rest Framework (DRF) application, the following steps can occur on the server side:
- Request Addressing: Django processes the incoming request and determines which view should be called to handle the request. This typically happens through URL routing;
- Invocation of the Relevant View: After identifying the necessary view, Django invokes it. In the case of a DRF application, this could be a view responsible for handling RESTful API requests;
- Request Processing According to View Logic: The view processes the incoming request according to its own logic. For example, if it's a GET request to fetch data, it may query the database to retrieve the relevant records;
- Results Serialization: After processing the request, results serialization takes place. This involves converting Python objects (or query results) into JSON or another format suitable for transmission over the network;
- Response Formation: The response to the request is formed with the serialized data. This may include HTTP headers, status codes, and the data itself;
- Sending the Response to the User: The generated response is sent back to the user over the network.
This process illustrates the general flow of handling a request in a DRF application on the server side.
Все було зрозуміло?
Зміст курсу
Django REST Framework
1. What is the Rest API ?
4. HTTP Request Methods
Django REST Framework
Overview of Course Project
During the course, we will learn to create and configure: models, serializers, URL addresses, and views. With this knowledge, we will collectively build a full-fledged server-side application.
![files list](https://codefinity-content-media.s3.eu-west-1.amazonaws.com/2094862b-414e-43a2-b303-58f071838bf6/Section+2/c1f4a768-cc7b-4b61-bf73-29f3c06fc72f.png)
When a user navigates to a link in a Django Rest Framework (DRF) application, the following steps can occur on the server side:
- Request Addressing: Django processes the incoming request and determines which view should be called to handle the request. This typically happens through URL routing;
- Invocation of the Relevant View: After identifying the necessary view, Django invokes it. In the case of a DRF application, this could be a view responsible for handling RESTful API requests;
- Request Processing According to View Logic: The view processes the incoming request according to its own logic. For example, if it's a GET request to fetch data, it may query the database to retrieve the relevant records;
- Results Serialization: After processing the request, results serialization takes place. This involves converting Python objects (or query results) into JSON or another format suitable for transmission over the network;
- Response Formation: The response to the request is formed with the serialized data. This may include HTTP headers, status codes, and the data itself;
- Sending the Response to the User: The generated response is sent back to the user over the network.
This process illustrates the general flow of handling a request in a DRF application on the server side.
Все було зрозуміло?