The easiest restapi for Django
pip install djangorestframework In your setting file, add the “rest_framework”: Create two files in your app: api : define the url api: define the function In url.py: In views.py: You can also use decorators, it will be simpler: