Looks at how to integrate Django REST Framework with Elasticsearch.
Django REST Framework (DRF) is a widely-used, full-featured API framework designed for building RESTful APIs with Django. At its core, DRF integrates with Django's core features -- models, views, and URLs -- making it simple and seamless to create RESTful HTTP resources.
DRF is composed of the following components:
- Serializers are used to convert Django querysets and model instances to (serialization) and from (deserialization) JSON (and a number of other data rendering formats like XML and YAML).
- Views (along with ViewSets), which are similar to traditional Django views, handle RESTful HTTP requests and responses. The view itself uses the serializers to validate incoming payloads and contains the necessary logic to return the response. Views are coupled with routers, which map the views back to the exposed URLs.
The articles and tutorials on TestDriven.io are on the more intermediate to advanced side that cover permissions, serializers, and Elasticsearch.
Latest Posts (12)
Add authentication to Django REST Framework and integrate it with Auth.js
Add authentication to Django REST Framework with django-allauth and dj-rest-auth.
This article serves as an introduction to Django REST Framework, focusing on serializers, views, and routers.
This tutorial shows how to build an intelligent educational platform using OpenAI APIs and Django.
Deep dive into Django REST Framework's most powerful view, ViewSets.
Use Django REST Framework's Generic Views to prevent repeating certain patterns over and over again.
Deep dive into how Django REST Framework's views work and its most basic view, APIView.
How to build custom permission classes in Django REST Framework.
How the built-in permission classes work in Django REST Framework.
How permissions work in Django REST Framework.
Deep dive into Django REST Framework (DRF) serializers.