Complete CRUD REST API
REpresentational State Transfer + Application Programming Interface REST API allows different applications (like mobile apps, frontend, backend) to talk to each other over the internet using HTTP methods (like GET, POST, PUT, DELETE). What is REST API in Django? In Django, you can create REST APIs using the library called Django REST Framework (DRF). With REST API in Django, you can: Send data to the backend (POST) Get data from the backend (GET) Update existing data (PUT/PATCH) Delete data (DELETE) pip install djangorestframework INSTALLED_APPS = [ ... ' rest_framework ', ] | Method | Endpoint | Purpose | Example | | ------ | ------------------------- | -------------------- | ----------- | | GET | `/ api /students/` | Get all students | List view | | GET | `/ api /students/1/` | Get 1 student (id=1) | Detail view | | POST | `/ api /students/create/` | Create new student | Add | | PUT ...