Build a Django REST API with the Django Rest Framework. Complete Tutorial.

Build a Django Rest API with the Django Rest Framework. Complete Tutorial. There’s a lot to cover so be sure to checkout the chapters below.

Thanks to Algolia.com for the sponsorship and helping make this series possible!

Tutorial Code: https://github.com/codingforentrepreneurs/Django-Rest-Framework-Tutorial

Setup Links
– macOS Setup Blog Post: https://www.codingforentrepreneurs.com/blog/install-django-on-mac-or-linux/
– maOS Setup Playlist: https://www.youtube.com/watch?v=C47c0TXrS-8&list=PLEsfXFp6DpzSP0VAiEgPg0a-A04sa3rkr
– Windows Setup Blog Post: https://www.codingforentrepreneurs.com/blog/install-python-django-on-windows/
– Windows Setup Playlist: https://www.youtube.com/watch?v=gmuu4swNGSk&list=PLEsfXFp6DpzQ33Q5xhD5naEV9K-Z6upZw)
– Linux Setup Blog Post: https://www.codingforentrepreneurs.com/blog/install-django-on-linux-ubuntu/

Links:
– Django: https://www.djangoproject.com/
– Django Rest framework: https://www.django-rest-framework.org/
– Python Requests: https://docs.python-requests.org/en/latest/
– VSCode: https://code.visualstudio.com/
– Python: https://www.python.org/
– Httpbin : https://httpbin.org
– algoliasearch-django package: https://github.com/algolia/algoliasearch-django
– Python JWT Client https://www.codingforentrepreneurs.com/blog/python-jwt-client-django-rest-framework-simplejwt
– Django Cors Headers https://pypi.org/project/django-cors-headers/
– Algolia InstantSearch.js https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/

00:00:00 Welcome to the Django Rest Framework
00:01:54 Tools we are using
00:04:36 Setup Python Virtual Environment, Install Req, and Start Django
00:11:40 Creating a Python API Client
00:27:01 Run Django Project
00:31:16 Create your first API View
00:37:06 Echo GET Data
00:47:10 Django Model Instance as API Response
00:54:45 Django Model Instance to Dictionary
01:00:41 Rest Framework View & Response
01:04:27 Django Rest Framework Model Serializers
01:14:45 Ingest Data with Django Rest Framework Views
01:27:05 Django Rest Framework Generics RetrieveAPIView
01:35:54 Django Rest Framework CreateAPIView
01:41:57 Django Rest Framework ListAPIView & ListCreateAPIView
01:44:36 Using Function Based Views For Create Retrieve or List
01:55:17 UpdateAPIView & DestroyAPIView
02:04:05 Mixins and a Generic API View
02:16:33 Session Authentication & Permissions
02:23:21 User & Group Permissions with DjangoModelPermissions
02:30:55 Custom Permissions
02:45:46 Token Authentication
02:59:45 Default Django Rest Framework Settings
03:07:39 Using Mixins for Permissions
03:13:15 ViewSets & Routers
03:25:51 URLs, Reverse, & Serializers
03:33:47 Model Serializer Create & Update Methods
03:41:47 Custom Validation with Serializers
03:53:04 Request User Data & Customize View Queryset
04:08:44 Related Fields & Foreign Key Serializer
04:24:30 Pagination
04:32:36 A Django Based Search for our Product API
04:48:34 Building your Search Engine on Algolia
05:09:54 Agolia Search Client for Django
05:30:22 Unified Design of Serializers & Indices
05:46:48 JSON WEB Token Authentication with simplejwt
06:00:30 Login via JavaScript Client
06:16:23 Handle Request Blocked by CORS via django cors headers
06:23:53 Using JWT with JS Client
06:39:54 Search via REST API & JS Client
06:48:40 Algolia InstantSearch.js
07:00:35 Thank you and next steps

You May Also Like